Gnash
0.8.11dev
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
libdevice
directfb
Renderer_DirectFB.h
Go to the documentation of this file.
1
//
2
// Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
3
// Free Software 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 GNASH_RENDER_HANDLER_DIRECTFB_H
20
#define GNASH_RENDER_HANDLER_DIRECTFB_H
21
22
#ifdef HAVE_CONFIG_H
23
#include "
gnashconfig.h
"
24
#endif
25
26
#include "
Renderer.h
"
27
#include "
Geometry.h
"
28
29
#include <map>
30
#include <vector>
31
32
#ifdef HAVE_DIRECTFB_H
33
# include <directfb/directfb.h>
34
#endif
35
36
namespace
gnash {
37
38
class
GnashImage;
39
class
SWFCxForm;
40
41
namespace
renderer {
42
43
namespace
DirectFB {
44
45
class
DSOEXPORT
Renderer_DirectFB
:
public
Renderer
46
{
47
public
:
48
std::string
description
()
const
{
return
"DirectFB"
; }
49
Renderer_DirectFB
();
50
~
Renderer_DirectFB
();
51
52
void
init(
float
x
,
float
y
);
53
CachedBitmap
*createCachedBitmap(std::auto_ptr<image::GnashImage> im);
54
55
void
world_to_pixel(
int
&
x
,
int
&
y
,
float
world_x,
float
world_y);
56
gnash::geometry::Range2d<int>
world_to_pixel(
const
gnash::SWFRect
& wb);
57
geometry::Range2d<int>
world_to_pixel(
const
geometry::Range2d<float>
& wb);
58
gnash::point
pixel_to_world(
int
,
int
);
59
60
void
begin_display(
const
gnash::rgba
&,
int
,
int
,
float
,
61
float
,
float
,
float
);
62
// This is from the patch
63
// void begin_display(const rgba& bg_color, int viewport_x0,
64
// int viewport_y0, int viewport_width,
65
// int viewport_height, float x0, float x1,
66
// float y0, float y1);
67
void
end_display();
68
void
drawLine(
const
std::vector<point>& coords,
const
rgba
&
fill
,
69
const
SWFMatrix
& mat);
70
void
drawVideoFrame(
gnash::image::GnashImage
*frame,
const
gnash::Transform
& tx,
71
const
gnash::SWFRect
*bounds,
bool
smooth);
72
void
drawPoly(
const
point
* corners,
size_t
corner_count,
73
const
rgba
&
fill
,
const
rgba
& outline,
74
const
SWFMatrix
& mat,
bool
masked);
75
void
drawShape(
const
gnash::SWF::ShapeRecord
&,
const
gnash::Transform
&);
76
void
drawGlyph(
const
SWF::ShapeRecord
& rec,
const
rgba
&
c
,
77
const
SWFMatrix
& mat);
78
79
void
set_antialiased(
bool
enable);
80
void
begin_submit_mask();
81
void
end_submit_mask();
82
void
apply_mask();
83
void
disable_mask();
84
85
void
set_scale(
float
xscale,
float
yscale);
86
void
set_invalidated_regions(
const
InvalidatedRanges
&ranges);
87
88
// These weren't in the patch
89
Renderer
*startInternalRender(
gnash::image::GnashImage
&);
90
void
endInternalRender();
91
92
unsigned
int
getBitsPerPixel();
93
bool
initTestBuffer(
unsigned
width
,
unsigned
height
);
94
95
// These methods are only for debugging and development
96
void
printVGParams();
97
void
printVGHardware();
98
void
printVGPath();
99
private
:
100
unsigned
char
*_testBuffer;
// buffer used by initTestBuffer() only
101
};
102
103
DSOEXPORT
Renderer
*
create_handler
(
const
char
*pixelformat);
104
105
}
// namespace gnash::renderer::DirectFB
106
}
// namespace gnash::renderer
107
}
// namespace gnash
108
109
#endif // __RENDER_HANDLER_DIRECTFB_H__
110
111
// local Variables:
112
// mode: C++
113
// indent-tabs-mode: nil
114
// End:
Generated on Wed Oct 23 2013 11:31:10 for Gnash by
1.8.4