Mir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
hwc_fallback_gl_renderer.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2014 Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU Lesser 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 Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authored by: Kevin DuBois <kevin.dubois@canonical.com>
17  */
18 
19 #ifndef MIR_GRAPHICS_ANDROID_HWC_FALLBACK_GL_RENDERER_H_
20 #define MIR_GRAPHICS_ANDROID_HWC_FALLBACK_GL_RENDERER_H_
21 #include "mir/geometry/rectangle.h"
25 #include <memory>
26 
27 namespace mir
28 {
29 namespace graphics
30 {
31 class GLContext;
32 class GLProgramFactory;
33 
34 namespace android
35 {
36 class SwappingGLContext;
37 
39 {
40 public:
41  virtual ~RenderableListCompositor() = default;
42  virtual void render(RenderableList const&, SwappingGLContext const&) const = 0;
43 protected:
44  RenderableListCompositor() = default;
45 private:
47  RenderableListCompositor& operator=(RenderableListCompositor const&) = delete;
48 };
49 
51 {
52 public:
54  GLProgramFactory const& program_factory,
55  graphics::GLContext const& gl_context,
56  geometry::Rectangle const& screen_position);
57 
58  void render(RenderableList const&, SwappingGLContext const&) const;
59 private:
60  std::unique_ptr<graphics::GLProgram> program;
61  std::unique_ptr<graphics::GLTextureCache> texture_cache;
62 
63  GLint position_attr;
64  GLint texcoord_attr;
65 };
66 
67 }
68 }
69 }
70 
71 #endif /* MIR_GRAPHICS_ANDROID_HWC_FALLBACK_GL_RENDERER_H_ */
All things Mir.
Definition: aging_buffer.h:24
Definition: hwc_fallback_gl_renderer.h:38
Definition: swapping_gl_context.h:31
Definition: gl_program_factory.h:31
std::list< std::shared_ptr< Renderable > > RenderableList
Definition: renderable.h:88
void render(RenderableList const &, SwappingGLContext const &) const
Definition: hwc_fallback_gl_renderer.cpp:101
Definition: rectangle.h:33
HWCFallbackGLRenderer(GLProgramFactory const &program_factory, graphics::GLContext const &gl_context, geometry::Rectangle const &screen_position)
Definition: hwc_fallback_gl_renderer.cpp:75
Definition: android_input_receiver.h:32
Definition: gl_context.h:27
virtual void render(RenderableList const &, SwappingGLContext const &) const =0
Definition: hwc_fallback_gl_renderer.h:50

Copyright © 2012,2013 Canonical Ltd.
Generated on Fri Oct 10 14:07:14 UTC 2014