Mir
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
src
platforms
android
server
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
"
22
#include "
mir/geometry/displacement.h
"
23
#include "
mir/gl/program.h
"
24
#include "
mir/gl/texture_cache.h
"
25
#include "
mir/graphics/renderable.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
39
class
RenderableListCompositor
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
:
47
RenderableListCompositor
(
RenderableListCompositor
const
&) =
delete
;
48
RenderableListCompositor
& operator=(
RenderableListCompositor
const
&) =
delete
;
49
};
50
51
class
HWCFallbackGLRenderer
:
public
RenderableListCompositor
52
{
53
public
:
54
HWCFallbackGLRenderer
(
55
gl::ProgramFactory
const
& program_factory,
56
graphics::GLContext
const
& gl_context,
57
geometry::Rectangle
const
& screen_position);
58
59
void
render(
RenderableList
const
&,
geometry::Displacement
,
SwappingGLContext
const
&)
const
;
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_ */
mir
All things Mir.
Definition:
atomic_callback.h:25
mir::graphics::android::RenderableListCompositor
Definition:
hwc_fallback_gl_renderer.h:39
texture_cache.h
mir::gl::ProgramFactory
Definition:
program_factory.h:31
mir::graphics::android::SwappingGLContext
Definition:
swapping_gl_context.h:31
program.h
rectangle.h
mir::geometry::Displacement
Definition:
displacement.h:32
mir::graphics::RenderableList
std::vector< std::shared_ptr< Renderable > > RenderableList
Definition:
renderable.h:79
mir::geometry::Rectangle
Definition:
rectangle.h:33
displacement.h
android
Definition:
android_input_receiver.h:36
mir::graphics::GLContext
Definition:
gl_context.h:27
renderable.h
mir::graphics::android::HWCFallbackGLRenderer
Definition:
hwc_fallback_gl_renderer.h:51
Copyright © 2012-2015 Canonical Ltd.
Generated on Thu Sep 8 14:50:19 UTC 2016