Gnash
0.8.11dev
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
gui
fb
fb_glue_ovg.h
Go to the documentation of this file.
1
//
2
// Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software
3
// Foundation, Inc
4
//
5
// This program is free software; you can redistribute it and/or modify
6
// it under the terms of the GNU General Public License as published by
7
// the Free Software Foundation; either version 3 of the License, or
8
// (at your option) any later version.
9
//
10
// This program is distributed in the hope that it will be useful,
11
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
// GNU General Public License for more details.
14
//
15
// You should have received a copy of the GNU General Public License
16
// along with this program; if not, write to the Free Software
17
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18
19
#ifndef FB_GLUE_OVG_H
20
#define FB_GLUE_OVG_H 1
21
22
#ifdef HAVE_CONFIG_H
23
#include "
gnashconfig.h
"
24
#endif
25
26
#include <boost/cstdint.hpp>
27
#include "
openvg/OpenVGRenderer.h
"
28
#include "
fbsup.h
"
29
#include "
fb_glue.h
"
30
31
#ifdef HAVE_VG_OPENVG_H
32
#include <VG/openvg.h>
33
#endif
34
35
#ifdef BUILD_RAWFB_DEVICE
36
# include "
rawfb/RawFBDevice.h
"
37
#endif
38
39
#ifdef BUILD_EGL_DEVICE
40
# include "
egl/eglDevice.h
"
41
#endif
42
43
namespace
gnash {
44
45
namespace
gui {
46
47
class
render_handler;
48
49
class
FBOvgGlue
:
public
FBGlue
50
{
51
52
public
:
53
FBOvgGlue
() {};
54
FBOvgGlue
(
int
fd);
55
// FBOvgGlue(int x, int y, int width, int height);
56
~FBOvgGlue
();
57
58
bool
init
(
int
argc,
char
***argv);
59
void
render
();
60
61
// resize(int width, int height);
62
void
draw
();
63
Renderer
*
createRenderHandler
();
64
void
setInvalidatedRegions
(
const
InvalidatedRanges
&ranges);
65
68
void
prepDrawingArea
(
void
*drawing_area);
69
70
void
initBuffer
(
int
width
,
int
height
);
71
void
resize
(
int
width
,
int
height
);
72
// void render(geometry::Range2d<int>& bounds);
73
74
// FIXME: these should go away to be replaced by the DeviceGlue
75
// versions of the same methods.
76
// int width() { return (_device) ? _device->getWidth() : 0; };
77
// int height() { return (_device) ? _device->getHeight() : 0; };
78
int
width
() {
return
_width; };
79
int
height
() {
return
_height; };
80
int
stride
() {
return
_stride; };
81
82
// these are used only for debugging purpose to access private data
83
size_t
getBounds
() {
return
_drawbounds.size(); };
84
85
private
:
86
int
_stride;
87
int
_width;
88
int
_height;
89
90
//Rectangle _bounds;
91
std::vector< geometry::Range2d<int> > _drawbounds;
92
geometry::Range2d<int>
_validbounds;
93
94
// EGL needs it's own display device, as that's how it stays platform
95
// independent. For a Framebuffer we use that, and on the desktop,
96
// well, there really isn't framebuffer support on the desktop because
97
// the X11 server has control of the device. So the X11 glue support
98
// for OpenVG on a fake framebuffer is for development only.
99
#ifdef BUILD_RAWFB_DEVICE
100
renderer::rawfb::RawFBDevice
_display;
101
#else
102
# ifdef BUILD_X11_DEVICE
103
renderer::x11::X11Device
_display;
104
# endif
105
#endif
106
};
107
108
}
// end of namespace gui
109
}
// end of namespace gnash
110
111
#endif // end of FB_GLUE_OVG_H
112
113
// Local Variables:
114
// mode: C++
115
// indent-tabs-mode: nil
116
// End:
Generated on Wed Oct 23 2013 11:31:08 for Gnash by
1.8.4