Mir
renderer.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2012-2016 Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License version 2 or 3,
6  * as published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authored by: Thomas Voss <thomas.voss@canonical.com>
17  */
18 
19 #ifndef MIR_RENDERER_RENDERER_H_
20 #define MIR_RENDERER_RENDERER_H_
21 
22 #include "mir/geometry/rectangle.h"
23 #include "mir/graphics/renderable.h"
24 #include "mir_toolkit/common.h"
25 #include <glm/glm.hpp>
26 
27 namespace mir
28 {
29 namespace renderer
30 {
31 
32 class Renderer
33 {
34 public:
35  virtual ~Renderer() = default;
36 
37  virtual void set_viewport(geometry::Rectangle const& rect) = 0;
38  virtual void set_output_transform(glm::mat2 const&) = 0;
39  virtual void render(graphics::RenderableList const&) const = 0;
40  virtual void suspend() = 0; // called when render() is skipped
41 
42 protected:
43  Renderer() = default;
44  Renderer(const Renderer&) = delete;
45  Renderer& operator=(const Renderer&) = delete;
46 };
47 
48 }
49 }
50 
51 #endif // MIR_RENDERER_RENDERER_H_
AutoUnblockThread is a helper thread class that can gracefully shutdown at destruction time...
Definition: blob.h:26
virtual ~Renderer()=default
Definition: renderer.h:32
virtual void set_output_transform(glm::mat2 const &)=0
virtual void suspend()=0
Renderer & operator=(const Renderer &)=delete
Definition: rectangle.h:33
virtual void set_viewport(geometry::Rectangle const &rect)=0
virtual void render(graphics::RenderableList const &) const =0

Copyright © 2012-2018 Canonical Ltd.
Generated on Sun Jun 17 06:26:29 UTC 2018