Mir
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"
23 #include "mir/gl/program.h"
24 #include "mir/gl/texture_cache.h"
26 #include <memory>
27 
28 namespace mir
29 {
30 namespace gl { class ProgramFactory; }
31 namespace graphics
32 {
33 class GLContext;
34 
35 namespace android
36 {
37 class SwappingGLContext;
38 
40 {
41 public:
42  virtual ~RenderableListCompositor() = default;
43  virtual void render(RenderableList const&, geometry::Displacement list_offset, SwappingGLContext const&) const = 0;
44 protected:
45  RenderableListCompositor() = default;
46 private:
48  RenderableListCompositor& operator=(RenderableListCompositor const&) = delete;
49 };
50 
52 {
53 public:
55  gl::ProgramFactory const& program_factory,
56  graphics::GLContext const& gl_context,
57  geometry::Rectangle const& screen_position);
58 
60 private:
61  std::unique_ptr<gl::Program> program;
62  std::unique_ptr<gl::TextureCache> texture_cache;
63 
64  GLint position_attr;
65  GLint texcoord_attr;
66 };
67 
68 }
69 }
70 }
71 
72 #endif /* MIR_GRAPHICS_ANDROID_HWC_FALLBACK_GL_RENDERER_H_ */
All things Mir.
Definition: atomic_callback.h:25
void render(RenderableList const &, geometry::Displacement, SwappingGLContext const &) const
Definition: hwc_fallback_gl_renderer.cpp:102
Definition: hwc_fallback_gl_renderer.h:39
Definition: program_factory.h:31
Definition: swapping_gl_context.h:31
virtual void render(RenderableList const &, geometry::Displacement list_offset, SwappingGLContext const &) const =0
Definition: displacement.h:32
std::vector< std::shared_ptr< Renderable > > RenderableList
Definition: renderable.h:79
Definition: rectangle.h:33
Definition: android_input_receiver.h:36
Definition: gl_context.h:27
HWCFallbackGLRenderer(gl::ProgramFactory const &program_factory, graphics::GLContext const &gl_context, geometry::Rectangle const &screen_position)
Definition: hwc_fallback_gl_renderer.cpp:76
Definition: hwc_fallback_gl_renderer.h:51

Copyright © 2012-2015 Canonical Ltd.
Generated on Thu Oct 8 16:20:16 UTC 2015