Go to the documentation of this file.
19 #ifndef GNASH_RENDER_HANDLER_GLES1_H
20 #define GNASH_RENDER_HANDLER_GLES1_H
29 #ifdef HAVE_GLES1_GL_H
32 #ifdef HAVE_GLES1_EGL_H
69 typedef std::map<const Path*, std::vector<oglVertex> >
PathPointMap;
77 refs.push_back(&new_path);
78 shape.push_back(refs);
84 refs.push_back(&add_path);
89 PathRefs new_refs(pathrefs.begin(), pathrefs.end());
90 shape.push_back(new_refs);
93 const std::vector<PathRefs>&
get()
const
98 std::vector<PathRefs> shape;
113 bool ogl_accessible);
119 inline bool ogl_accessible()
const;
123 mutable std::unique_ptr<GnashImage> _img;
124 GLenum _pixel_format;
125 GLenum _ogl_img_type;
126 mutable bool _ogl_accessible;
127 mutable GLuint _texture_id;
141 void init(
float x,
float y);
142 CachedBitmap *createCachedBitmap(std::unique_ptr<image::GnashImage> im);
144 void world_to_pixel(
int&
x,
int&
y,
float world_x,
float world_y)
const;
149 void begin_display(
const gnash::rgba&,
int,
int,
float,
150 float,
float,
float);
157 void drawLine(
const std::vector<point>& coords,
const rgba&
fill,
161 void draw_poly(
const std::vector<point>& corners,
168 void set_antialiased(
bool enable);
169 void begin_submit_mask();
170 void end_submit_mask();
174 void set_scale(
float xscale,
float yscale);
179 void endInternalRender();
182 bool initTestBuffer(
unsigned width,
unsigned height);
189 unsigned char *_testBuffer;
198 #endif // __RENDER_HANDLER_GLES1_H__
const std::vector< PathRefs > & get() const
Definition: Renderer_gles1.h:93
void drawVideoFrame(gnash::image::GnashImage *frame, const gnash::Transform &tx, const gnash::SWFRect *bounds, bool smooth)
Draws a video frame.
Definition: Renderer_gles1.cpp:119
void begin_submit_mask()
Definition: Renderer_gles1.cpp:234
@ WRAP_REPEAT
Definition: Renderer_gles1.h:108
@ height
Definition: klash_part.cpp:329
std::vector< Path > PathVec
Definition: Renderer_cairo.h:35
void begin_display(const gnash::rgba &, int, int, float, float, float, float)
Bracket the displaying of a frame from a movie.
Definition: Renderer_gles1.cpp:184
Definition: Renderer_gles1.h:133
void apply(const gnash::SWFMatrix &bitmap_matrix, bitmap_wrap_mode wrap_mode) const
Definition: Renderer_ogl.cpp:634
void set_antialiased(bool enable)
Definition: Renderer_gles1.cpp:228
oglVertex(GLfloat x, GLfloat y, GLfloat z=0.0)
Definition: Renderer_gles1.h:54
T getMaxY() const
Get max Y ordinate.
Definition: Range2d.h:633
std::int32_t get_x_max() const
Get the x coordinate of the right-down corner.
Definition: SWFRect.h:122
void drawGlyph(const SWF::ShapeRecord &rec, const rgba &c, const SWFMatrix &mat)
Draws a glyph (font character).
Definition: Renderer_gles1.cpp:221
void draw_poly(const std::vector< point > &corners, const rgba &fill, const rgba &outline, const SWFMatrix &mat, bool masked)
Draw a simple, solid filled polygon with a thin (~1 pixel) outline.
Definition: Renderer_gles1.cpp:203
void addPath(const Path &add_path)
Definition: Renderer_gles1.h:81
std::int32_t y
Definition: BitmapData_as.cpp:435
A basic RGBA type.
Definition: RGBA.h:36
SWFMatrix & invert()
Invert this SWFMatrix and return the result.
Definition: SWFMatrix.cpp:288
bitmap_wrap_mode
Set line and fill styles for mesh & line_strip rendering.
Definition: Renderer_gles1.h:107
GLfloat _x
Definition: Renderer_gles1.h:64
void set_scale(float xscale, float yscale)
Sets the x/y scale for the movie
Definition: Renderer_gles1.cpp:266
#define _(String)
Definition: log.h:44
oglVertex(const point &p)
Definition: Renderer_gles1.h:59
dtype_t
The list of supported device types.
Definition: GnashDevice.h:48
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:41
T getMaxX() const
Get max X ordinate.
Definition: Range2d.h:613
bool is_null() const
returns true if this is a NULL rectangle
Definition: SWFRect.h:75
void end_submit_mask()
Definition: Renderer_gles1.cpp:245
std::int32_t get_y_max() const
Get the y coordinate of the right-down corner.
Definition: SWFRect.h:136
Base class for different types of bitmaps.
Definition: GnashImage.h:78
Renderer_gles1(GnashDevice::dtype_t dtype)
#define GNASH_REPORT_FUNCTION
Definition: log.h:452
Base class for render handlers.
Definition: Renderer.h:189
GLfloat _y
Definition: Renderer_gles1.h:65
unsigned int getBitsPerPixel()
Renderer * startInternalRender(gnash::image::GnashImage &)
Setup the renderer to draw to an internal buffer.
Definition: Renderer_gles1.cpp:301
@ worldRange
A WORLD range2d is a range including all points on the plane.
Definition: Range2d.h:52
T getMinX() const
Get min X ordinate.
Definition: Range2d.h:603
Definition: Renderer_gles1.h:72
bool is_world() const
TODO: deprecate this 'world' concept.
Definition: SWFRect.h:87
void log_error(StringType msg, Args... args)
Definition: log.h:283
bool isNull() const
Returns true if this is the NULL Range2d.
Definition: Range2d.h:181
Rectangle class, see swf defined rectangle record.
Definition: SWFRect.h:45
void set_invalidated_regions(const InvalidatedRanges &ranges)
Sets the update region (called prior to begin_display).
Definition: Renderer_gles1.cpp:278
CachedBitmap * createCachedBitmap(std::unique_ptr< image::GnashImage > im)
Given an image, returns a pointer to a CachedBitmap class that can later be passed to FillStyleX_bitm...
Definition: Renderer_gles1.cpp:111
void endInternalRender()
Finish internal rendering.
Definition: Renderer_gles1.cpp:309
bool isWorld() const
Returns true if this is the WORLD Range2d.
Definition: Range2d.h:200
VGPaint fill
Definition: testr_gtk.cpp:86
void init(float x, float y)
Definition: Renderer_gles1.cpp:105
void apply_mask()
Definition: Renderer_gles1.cpp:254
std::int32_t get_x_min() const
Get the x coordinate of the left-up corner.
Definition: SWFRect.h:115
void addPathRefs(const PathRefs &pathrefs)
Definition: Renderer_gles1.h:87
void transform(geometry::Point2d &p) const
Transform a given point by our SWFMatrix.
Definition: SWFMatrix.cpp:99
T getMinY() const
Get min Y ordinate.
Definition: Range2d.h:623
A subset of a shape, a series of edges sharing a single set of styles.
Definition: Geometry.h:167
void end_display()
Definition: Renderer_gles1.cpp:191
std::string description() const
Return a description of this renderer.
Definition: Renderer_gles1.h:135
@ z
Definition: GnashKey.h:172
@ p
Definition: GnashKey.h:162
void newPath(const Path &new_path)
Definition: Renderer_gles1.h:74
@ nullRange
A NULL range is a range enclosing NO points.
Definition: Range2d.h:43
void drawShape(const gnash::SWF::ShapeRecord &, const gnash::Transform &)
Definition: Renderer_gles1.cpp:210
~bitmap_info_ogl()
Definition: Renderer_ogl.cpp:560
Definition: SWFMatrix.h:54
2D Point class
Definition: Point2d.h:39
void world_to_pixel(int &x, int &y, float world_x, float world_y) const
Definition: Renderer_gles1.cpp:128
bool initTestBuffer(unsigned width, unsigned height)
Definition: Renderer_gles1.cpp:284
void disable_mask()
Definition: Renderer_gles1.cpp:260
bool initDevice(int argc, char *argv[])
Definition: eglDevice.cpp:169
void drawLine(const std::vector< point > &coords, const rgba &fill, const SWFMatrix &mat)
Draw a line-strip directly, using a thin, solid line.
Definition: Renderer_gles1.cpp:197
@ f
Definition: GnashKey.h:152
bitmap_info_ogl(GnashImage *image, GLenum pixelformat, bool ogl_accessible)
Definition: Renderer_ogl.cpp:541
Definition: eglDevice.h:57
@ c
Definition: GnashKey.h:149
gnash::point pixel_to_world(int, int) const
Converts pixel coordinates to world coordinates (TWIPS)
Definition: Renderer_gles1.cpp:171
std::map< const Path *, std::vector< oglVertex > > PathPointMap
Definition: Renderer_gles1.h:69
#define DSOEXPORT
Definition: dsodefs.h:55
Renderer * create_handler(const char *)
Definition: Renderer_gles1.cpp:315
Holds information needed to draw a shape.
Definition: ShapeRecord.h:127
Definition: Renderer_gles1.h:53
Definition: Renderer_gles1.h:102
~Renderer_gles1()
Definition: Renderer_gles1.cpp:99
GLfloat _z
Definition: Renderer_gles1.h:66
@ width
Definition: klash_part.cpp:329
void log_unimpl(StringType msg, Args... args)
Definition: log.h:289
std::vector< const Path * > PathRefs
Definition: Renderer_gles1.h:51
A CachedBitmap is created by the renderer in a format of its choosing.
Definition: CachedBitmap.h:38
std::int32_t x
Definition: BitmapData_as.cpp:434
SimpleBuffer data
Definition: LocalConnection_as.cpp:151
Renderer_gles1()
Definition: Renderer_gles1.cpp:91
std::int32_t get_y_min() const
Get the y coordinate of the left-up corner.
Definition: SWFRect.h:129
@ WRAP_CLAMP
Definition: Renderer_gles1.h:109