Gnash
0.8.11dev
|
#include <Renderer_gles1.h>
Public Member Functions | |
std::string | description () const |
Return a description of this renderer. More... | |
Renderer_gles1 () | |
Renderer_gles1 (GnashDevice::dtype_t dtype) | |
~Renderer_gles1 () | |
void | init (float x, float y) |
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_bitmap(), to set a bitmap fill style. More... | |
void | world_to_pixel (int &x, int &y, float world_x, float world_y) const |
gnash::geometry::Range2d< int > | world_to_pixel (const gnash::SWFRect &wb) const |
Converts world coordinates to pixel coordinates. More... | |
geometry::Range2d< int > | world_to_pixel (const geometry::Range2d< float > &wb) const |
gnash::point | pixel_to_world (int, int) const |
Converts pixel coordinates to world coordinates (TWIPS) More... | |
void | begin_display (const gnash::rgba &, int, int, float, float, float, float) |
Bracket the displaying of a frame from a movie. More... | |
void | end_display () |
void | drawLine (const std::vector< point > &coords, const rgba &fill, const SWFMatrix &mat) |
Draw a line-strip directly, using a thin, solid line. More... | |
void | drawVideoFrame (gnash::image::GnashImage *frame, const gnash::Transform &tx, const gnash::SWFRect *bounds, bool smooth) |
Draws a video frame. More... | |
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. More... | |
void | drawShape (const gnash::SWF::ShapeRecord &, const gnash::Transform &) |
void | drawGlyph (const SWF::ShapeRecord &rec, const rgba &c, const SWFMatrix &mat) |
Draws a glyph (font character). More... | |
void | set_antialiased (bool enable) |
void | begin_submit_mask () |
void | end_submit_mask () |
void | apply_mask () |
void | disable_mask () |
void | set_scale (float xscale, float yscale) |
Sets the x/y scale for the movie. More... | |
void | set_invalidated_regions (const InvalidatedRanges &ranges) |
Sets the update region (called prior to begin_display). More... | |
Renderer * | startInternalRender (gnash::image::GnashImage &) |
Setup the renderer to draw to an internal buffer. More... | |
void | endInternalRender () |
Finish internal rendering. More... | |
unsigned int | getBitsPerPixel () |
bool | initTestBuffer (unsigned width, unsigned height) |
void | printVGParams () |
void | printVGHardware () |
void | printVGPath () |
![]() | |
Renderer () | |
virtual | ~Renderer () |
virtual void | set_translation (float, float) |
void | setQuality (Quality q) |
virtual void | renderToImage (std::unique_ptr< IOChannel >, FileType, int) const |
Draw the current rendering buffer to an image file. More... | |
geometry::Range2d< int > | world_to_pixel (const geometry::Range2d< int > &wb) const |
geometry::Range2d< int > | pixel_to_world (const geometry::Range2d< int > &pixelbounds) const |
virtual bool | bounds_in_clipping_area (const geometry::Range2d< int > &) const |
Checks if the given bounds are (partially) in the current drawing clipping area. More... | |
virtual RenderImages::const_iterator | getFirstRenderImage () const |
virtual RenderImages::const_iterator | getLastRenderImage () const |
![]() | |
EGLDevice () | |
EGLDevice (int argc, char *argv[]) | |
EGLDevice (GnashDevice::rtype_t rtype) | |
virtual | ~EGLDevice () |
dtype_t | getType () |
bool | initDevice (int argc, char *argv[]) |
bool | attachWindow (GnashDevice::native_window_t window) |
const char * | getErrorString (int error) |
Return a string with the error code as text, instead of a numeric value. More... | |
size_t | getStride () |
Query the system for all supported configs. More... | |
size_t | getWidth () |
Get the width of the device. More... | |
size_t | getHeight () |
Get the Height of the device. More... | |
EGLint | getDepth () |
Get the depth of the device. More... | |
int | getRedSize () |
Get the size of the Red pixel. More... | |
int | getGreenSize () |
Get the size of the Green pixel. More... | |
int | getBlueSize () |
Get the size of the Blue pixel. More... | |
bool | isSingleBuffered () |
Is this device single buffered. More... | |
bool | isBufferDestroyed () |
Are buffers destroyed ? More... | |
int | getID () |
Get the window ID handle. More... | |
bool | supportsRenderer (GnashDevice::rtype_t rtype) |
Is the specified renderer supported by this hardware ? More... | |
bool | isNativeRender () |
Is this renderering natively. More... | |
bool | bindClient (GnashDevice::rtype_t rtype) |
size_t | getWidth (EGLSurface surface) |
size_t | getHeight (EGLSurface surface) |
bool | isBufferDestroyed (EGLSurface surface) |
bool | checkEGLConfig (EGLConfig config) |
Check the requested EGl configuration against the current one. More... | |
int | queryEGLConfig () |
Query the system for all supported configs. More... | |
int | queryEGLConfig (EGLDisplay display) |
Query the system for all supported configs. More... | |
void | printEGLConfig () |
void | printEGLConfig (EGLConfig config) |
void | printEGLContext () |
void | printEGLContext (EGLContext context) |
void | printEGLSurface () |
void | printEGLSurface (EGLSurface surface) |
void | printEGLAttribs (const EGLint *attrib) |
EGLSurface | createPbuffer (int width, int height) |
EGLSurface | createPbuffer (int width, int height, EGLClientBuffer buf, EGLenum type) |
EGLSurface | createPixmap (int width, int height, NativePixmapType buf) |
size_t | totalPbuffers () |
EGLSurface & | operator[] (int index) |
bool | swapBuffers () |
bool | copyPbuffers (size_t x) |
bool | makePbufferCurrent () |
bool | makePbufferCurrent (size_t x) |
size_t | getVerticalRes () |
size_t | getHorzRes () |
bool | isBackBuffered () |
bool | isMultiSample () |
EGLint | getSurfaceID () |
EGLint | getContextID () |
bool | isContextSingleBuffered () |
bool | isContextBackBuffered () |
EGLint | getSamples () |
EGLint | getSampleBuffers () |
EGLint | getMaxSwapInterval () |
EGLint | getMinSwapInterval () |
void | setAttrib (int bpp) |
![]() | |
GnashDevice (int argc, char *argv[]) | |
GnashDevice () | |
virtual | ~GnashDevice () |
virtual std::uint8_t * | getFBMemory () |
Get the memory from the real framebuffer. More... | |
virtual std::uint8_t * | getOffscreenBuffer () |
Get the memory from an offscreen buffer to support Double Buffering. More... | |
virtual size_t | getFBMemSize () |
Additional Inherited Members | |
![]() | |
typedef std::shared_ptr< GnashVaapiImageProxy > | RenderImage |
typedef std::vector< RenderImage > | RenderImages |
![]() | |
enum | quality_e { LOW, MEDIUM, HIGH } |
![]() | |
enum | rtype_t { OPENVG, OPENGL, OPENGLES1, OPENGLES2, XORG, VAAPI } |
The list of supported renders that use devices. More... | |
enum | dtype_t { GNASH_NODEV, EGL, DIRECTFB, X11, RAWFB } |
The list of supported device types. More... | |
typedef long | native_window_t |
![]() | |
static EGLint | getRenderableTypes () |
![]() | |
Quality | _quality |
Kept in parallel with movie_root's setting. More... | |
RenderImages | _render_images |
![]() | |
EGLConfig | _eglConfig |
EGLContext | _eglContext |
EGLSurface | _eglSurface |
EGLDisplay | _eglDisplay |
EGLNativeWindowType | _nativeWindow |
EGLNativePixmapType | _nativePixmap |
quality_e | _quality |
const EGLint * | _attrib |
unsigned int | _bpp |
std::vector< EGLSurface > | _pbuffers |
gnash::renderer::gles1::Renderer_gles1::Renderer_gles1 | ( | ) |
References _, gnash::renderer::EGLDevice::initDevice(), and gnash::log_error().
Referenced by gnash::renderer::gles1::create_handler().
gnash::renderer::gles1::Renderer_gles1::Renderer_gles1 | ( | GnashDevice::dtype_t | dtype | ) |
gnash::renderer::gles1::Renderer_gles1::~Renderer_gles1 | ( | ) |
References GNASH_REPORT_FUNCTION.
void gnash::renderer::gles1::Renderer_gles1::apply_mask | ( | ) |
References GNASH_REPORT_FUNCTION.
Referenced by end_submit_mask().
|
virtual |
Bracket the displaying of a frame from a movie.
Set up to render a full frame from a movie and fills the background. Sets up necessary transforms, to scale the movie to fit within the given dimensions. Call end_display() when you're done. Most of the arguments are only for the ogl renderer. See documentation in that class. Do not use these arguments for new renderers!
Implements gnash::Renderer.
References GNASH_REPORT_FUNCTION.
|
virtual |
Masks
Masks are defined by drawing calls enclosed by begin_submit_mask() and end_submit_mask(). Between these two calls, no drawing is to occur. The shapes rendered between the two calls define the visible region of the mask. Graphics that are irrelevant in the context of a mask (lines and fill styles, for example) should be ignored. After use, disable_mask() is called to remove the mask. Masks may be nested. That is, end_submit_mask() may be followed by a call to begin_submit_mask(). The resulting mask shall be an intersection of the previously created mask. disable_mask() shall result in the disabling or destruction of the last created mask.
Implements gnash::Renderer.
|
virtual |
Given an image, returns a pointer to a CachedBitmap class that can later be passed to FillStyleX_bitmap(), to set a bitmap fill style.
==================================================================
Implements gnash::Renderer.
References GNASH_REPORT_FUNCTION.
|
inlinevirtual |
Return a description of this renderer.
Implements gnash::Renderer.
|
virtual |
Implements gnash::Renderer.
References GNASH_REPORT_FUNCTION.
|
virtual |
Draw a simple, solid filled polygon with a thin (~1 pixel) outline.
This can't be used for Flash shapes but is intended for internal drawings like bounding boxes (editable text fields) and similar. The polygon should not contain self-intersections. If you do not wish a outline or a fill, then simply set the alpha value to zero.
The polygon need NOT be closed (ie: this function will automatically add an additional vertex to close it.
When masked==false, then any potential mask currently active will be ignored, otherwise it is respected.
Implements gnash::Renderer.
References GNASH_REPORT_FUNCTION.
|
virtual |
Draws a glyph (font character).
Glyphs are defined just like shape characters with the difference that they do not have any fill or line styles. Instead, the shape must be drawn using the given color (solid fill). Please note that although the glyph paths may indicate subshapes, the renderer is to ignore that information.
def | |
mat | |
color |
Implements gnash::Renderer.
References GNASH_REPORT_FUNCTION.
|
virtual |
Draw a line-strip directly, using a thin, solid line.
Can be used to draw empty boxes and cursors.
an array of 16-bit signed integer coordinates. Even indices (and 0) are x coordinates, while uneven ones are y coordinates.
the number of x-y coordinates (vertices).
the color to be used to draw the line strip.
the SWFMatrix to be used to transform the vertices.
Implements gnash::Renderer.
References GNASH_REPORT_FUNCTION.
|
virtual |
Implements gnash::Renderer.
References GNASH_REPORT_FUNCTION.
|
virtual |
Draws a video frame.
==================================================================
The frame has already been decoded and is available in RGB format only.
frame | The RGB video buffer frame. Ownership of the buffer is left to the caller. |
mat | The SWFMatrix with world coordinates used to retrieve the x and y coordinate of the video object. The scaling of the SWFMatrix only refers to the Flash instance, not to the video inside that instance. When a video object is placed on the stage and the loaded video is smaller, then the SWFMatrix is still an "identity matrix". However, if the video object is scaled via ActionScript, for example, then the SWFMatrix will change. This means the renderer has to find the correct scaling for the video inside the bounds. |
bounds | The minX/minY fields of this SWFRect are always zero. The width and height determine the size of the Flash video instance on the stage (in TWIPS) prior to SWFMatrix transformations. |
Implements gnash::Renderer.
References _, GNASH_REPORT_FUNCTION, and gnash::log_unimpl().
|
virtual |
Implements gnash::Renderer.
References GNASH_REPORT_FUNCTION.
|
virtual |
Implements gnash::Renderer.
References apply_mask().
|
virtual |
Finish internal rendering.
Any rendering after this function has been called must apply to the external buffer.
Implements gnash::Renderer.
References GNASH_REPORT_FUNCTION.
unsigned int gnash::renderer::gles1::Renderer_gles1::getBitsPerPixel | ( | ) |
void gnash::renderer::gles1::Renderer_gles1::init | ( | float | x, |
float | y | ||
) |
References GNASH_REPORT_FUNCTION.
bool gnash::renderer::gles1::Renderer_gles1::initTestBuffer | ( | unsigned | width, |
unsigned | height | ||
) |
References GNASH_REPORT_FUNCTION, height, and width.
|
virtual |
Converts pixel coordinates to world coordinates (TWIPS)
Implements gnash::Renderer.
References gnash::SWFMatrix::invert(), gnash::key::p, and gnash::SWFMatrix::transform().
void gnash::renderer::gles1::Renderer_gles1::printVGHardware | ( | ) |
void gnash::renderer::gles1::Renderer_gles1::printVGParams | ( | ) |
void gnash::renderer::gles1::Renderer_gles1::printVGPath | ( | ) |
void gnash::renderer::gles1::Renderer_gles1::set_antialiased | ( | bool | enable | ) |
References _, and gnash::log_unimpl().
|
virtual |
Sets the update region (called prior to begin_display).
==================================================================
The renderer might do clipping and leave the region outside these bounds unchanged, but he is allowed to change them if that makes sense. After rendering a frame the area outside the invalidated region can be undefined and is not used.
It is not required for all renderers. Parameters are world coordinates (TWIPS).
For more info see page Detection of updated regions.
Reimplemented from gnash::Renderer.
References GNASH_REPORT_FUNCTION.
|
virtual |
Sets the x/y scale for the movie.
==================================================================
Reimplemented from gnash::Renderer.
References gnash::key::f, and GNASH_REPORT_FUNCTION.
|
virtual |
Setup the renderer to draw to an internal buffer.
Implementations are free to return a new renderer if they choose.
Implements gnash::Renderer.
References GNASH_REPORT_FUNCTION.
void gnash::renderer::gles1::Renderer_gles1::world_to_pixel | ( | int & | x, |
int & | y, | ||
float | world_x, | ||
float | world_y | ||
) | const |
References gnash::key::p, gnash::geometry::Point2d::x, x, gnash::geometry::Point2d::y, and y.
Referenced by world_to_pixel().
|
virtual |
Converts world coordinates to pixel coordinates.
==================================================================
Implements gnash::Renderer.
References gnash::SWFRect::get_x_max(), gnash::SWFRect::get_x_min(), gnash::SWFRect::get_y_max(), gnash::SWFRect::get_y_min(), gnash::SWFRect::is_null(), gnash::SWFRect::is_world(), gnash::geometry::nullRange, world_to_pixel(), and gnash::geometry::worldRange.
geometry::Range2d< int > gnash::renderer::gles1::Renderer_gles1::world_to_pixel | ( | const geometry::Range2d< float > & | wb | ) | const |