Mir
renderer.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2012 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 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_COMPOSITOR_RENDERER_H_
20 #define MIR_COMPOSITOR_RENDERER_H_
21 
22 #include "mir/geometry/rectangle.h"
24 #include <mir_toolkit/common.h>
25 
26 namespace mir
27 {
28 namespace graphics { class Buffer; }
29 
30 namespace compositor
31 {
32 
33 class Renderer
34 {
35 public:
36  virtual ~Renderer() = default;
37 
38  virtual void set_viewport(geometry::Rectangle const& rect) = 0;
39  // Mirroring is to be applied after orientation
40  virtual void set_output_transform(MirOrientation orientation, MirMirrorMode mode) = 0;
41  virtual void render(graphics::RenderableList const&) const = 0;
42  virtual void suspend() = 0; // called when render() is skipped
43 
44 protected:
45  Renderer() = default;
46  Renderer(const Renderer&) = delete;
47  Renderer& operator=(const Renderer&) = delete;
48 };
49 
50 }
51 }
52 
53 #endif // MIR_COMPOSITOR_RENDERER_H_
All things Mir.
Definition: atomic_callback.h:25
Definition: renderer.h:33
MirOrientation
Direction relative to the "natural" orientation of the display.
Definition: common.h:164
MirMirrorMode
Mirroring axis relative to the "natural" orientation of the display.
Definition: common.h:173
std::vector< std::shared_ptr< Renderable > > RenderableList
Definition: renderable.h:79
Definition: rectangle.h:33

Copyright © 2012-2015 Canonical Ltd.
Generated on Thu Sep 8 14:50:19 UTC 2016