Gnash
0.8.11dev
|
#include <eglDevice.h>
Public Types | |
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 { NODEV, EGL, DIRECTFB, X11, RAWFB } |
The list of supported device types. More... | |
typedef long | native_window_t |
Public Member Functions | |
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 boost::uint8_t * | getFBMemory () |
Get the memory from the real framebuffer. More... | |
virtual boost::uint8_t * | getOffscreenBuffer () |
Get the memory from an offscreen buffer to support Double Buffering. More... | |
virtual size_t | getFBMemSize () |
Static Public Member Functions | |
static EGLint | getRenderableTypes () |
Protected Attributes | |
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::EGLDevice::EGLDevice | ( | ) |
References _bpp, GNASH_REPORT_FUNCTION, and setAttrib().
gnash::renderer::EGLDevice::EGLDevice | ( | int | argc, |
char * | argv[] | ||
) |
References _, _bpp, GNASH_REPORT_FUNCTION, initDevice(), and setAttrib().
gnash::renderer::EGLDevice::EGLDevice | ( | GnashDevice::rtype_t | rtype | ) |
References _, _bpp, bindClient(), GNASH_REPORT_FUNCTION, initDevice(), and setAttrib().
|
virtual |
References _eglContext, _eglDisplay, _eglSurface, and _pbuffers.
|
virtual |
Attach Native Window to device. This connects a Native Window to the device so surfaces can be created.
Implements gnash::renderer::GnashDevice.
References _, _eglConfig, _eglContext, _eglDisplay, _eglSurface, _nativeWindow, getErrorString(), GNASH_REPORT_FUNCTION, printEGLContext(), printEGLSurface(), and gnash::renderer::surface_attributes.
|
virtual |
Reimplemented from gnash::renderer::GnashDevice.
References _, getErrorString(), GNASH_REPORT_FUNCTION, gnash::renderer::GnashDevice::OPENGLES1, gnash::renderer::GnashDevice::OPENGLES2, gnash::renderer::GnashDevice::OPENVG, gnash::renderer::GnashDevice::VAAPI, and gnash::renderer::GnashDevice::XORG.
Referenced by EGLDevice(), and gnash::gui::GtkOvgGlue::prepDrawingArea().
bool gnash::renderer::EGLDevice::checkEGLConfig | ( | EGLConfig | config | ) |
Check the requested EGl configuration against the current one.
References _bpp, and _eglDisplay.
Referenced by initDevice().
|
inline |
References _eglDisplay, _pbuffers, GNASH_REPORT_FUNCTION, and pix.
EGLSurface gnash::renderer::EGLDevice::createPbuffer | ( | int | width, |
int | height | ||
) |
References _, _eglConfig, _eglDisplay, _pbuffers, height, and width.
EGLSurface gnash::renderer::EGLDevice::createPbuffer | ( | int | width, |
int | height, | ||
EGLClientBuffer | buf, | ||
EGLenum | type | ||
) |
References _, _eglConfig, _eglDisplay, _pbuffers, height, and width.
EGLSurface gnash::renderer::EGLDevice::createPixmap | ( | int | width, |
int | height, | ||
NativePixmapType | buf | ||
) |
References _, _eglConfig, _eglDisplay, _pbuffers, height, and width.
|
inlinevirtual |
Get the size of the Blue pixel.
Implements gnash::renderer::GnashDevice.
References _eglConfig, and _eglDisplay.
|
inline |
References _eglContext, and _eglDisplay.
|
inlinevirtual |
Get the depth of the device.
Implements gnash::renderer::GnashDevice.
References _eglConfig, and _eglDisplay.
Referenced by getStride().
|
virtual |
Return a string with the error code as text, instead of a numeric value.
Implements gnash::renderer::GnashDevice.
Referenced by attachWindow(), bindClient(), initDevice(), and queryEGLConfig().
|
inlinevirtual |
Get the size of the Green pixel.
Implements gnash::renderer::GnashDevice.
References _eglConfig, and _eglDisplay.
|
inlinevirtual |
|
inline |
References _eglDisplay.
|
inline |
References _eglDisplay, and _eglSurface.
|
inlinevirtual |
|
inline |
References _eglConfig, and _eglDisplay.
|
inline |
References _eglConfig, and _eglDisplay.
|
inlinevirtual |
Get the size of the Red pixel.
Implements gnash::renderer::GnashDevice.
References _eglConfig, and _eglDisplay.
|
static |
|
inline |
References _eglConfig, and _eglDisplay.
|
inline |
References _eglConfig, and _eglDisplay.
|
inlinevirtual |
Query the system for all supported configs.
Get the stride of the device
Implements gnash::renderer::GnashDevice.
References getDepth(), and getWidth().
|
inline |
References _eglDisplay, and _eglSurface.
Referenced by getID().
|
inlinevirtual |
Get the type of the instatiated device. Since the renderer has a single value for the supported device, this is used to see which device has been loaded.
Implements gnash::renderer::GnashDevice.
References gnash::renderer::GnashDevice::EGL.
|
inline |
References _eglDisplay, and _eglSurface.
|
inlinevirtual |
Get the width of the device.
Implements gnash::renderer::GnashDevice.
References _eglSurface.
Referenced by getStride().
|
inline |
References _eglDisplay.
|
virtual |
To start, initialize the device with the command line arguments. These are ignored by EGL, but passed through here to follow the way most other Devices need to be initialized.
Once initialized, EGL must be told which Client API to use, this is either OpenVG, OpenGLES1, or OpenGLES2. To do this, we bind the EGL device to the client API.
Once bound, the last step attaches the window surface of the desktop or framebuffer to EGL. This is what binds EGL to the desktop or framebuffer.
This is done by bindClient() later on
Implements gnash::renderer::GnashDevice.
References _, _eglConfig, _eglDisplay, _quality, checkEGLConfig(), dbglogfile, getErrorString(), GNASH_REPORT_FUNCTION, HIGH, LOW, MEDIUM, and printEGLConfig().
Referenced by EGLDevice(), and gnash::renderer::gles1::Renderer_gles1::Renderer_gles1().
|
inline |
References _eglDisplay, and _eglSurface.
|
inlinevirtual |
|
inline |
References _eglDisplay.
|
inline |
References _eglContext, and _eglDisplay.
|
inline |
References _eglContext, and _eglDisplay.
|
inline |
References _eglDisplay, and _eglSurface.
|
inlinevirtual |
Is this renderering natively.
Implements gnash::renderer::GnashDevice.
References _eglConfig, and _eglDisplay.
|
inlinevirtual |
Is this device single buffered.
Implements gnash::renderer::GnashDevice.
References _eglDisplay, and _eglSurface.
Referenced by swapBuffers().
|
inline |
References _eglContext, _eglDisplay, and _eglSurface.
|
inline |
References _eglContext, _eglDisplay, and _pbuffers.
|
inline |
References _pbuffers.
void gnash::renderer::EGLDevice::printEGLAttribs | ( | const EGLint * | attrib | ) |
References gnash::key::i.
|
inline |
References _eglConfig, and printEGLConfig().
Referenced by initDevice(), printEGLConfig(), and queryEGLConfig().
void gnash::renderer::EGLDevice::printEGLConfig | ( | EGLConfig | config | ) |
References _eglDisplay, blue, green, and red.
|
inline |
References _eglContext, and printEGLContext().
Referenced by attachWindow(), gnash::gui::GtkOvgGlue::prepDrawingArea(), and printEGLContext().
void gnash::renderer::EGLDevice::printEGLContext | ( | EGLContext | context | ) |
References _eglDisplay.
|
inline |
References _eglSurface, and printEGLSurface().
Referenced by attachWindow(), gnash::gui::GtkOvgGlue::prepDrawingArea(), and printEGLSurface().
void gnash::renderer::EGLDevice::printEGLSurface | ( | EGLSurface | surface | ) |
References _eglDisplay.
|
inline |
Query the system for all supported configs.
References _eglDisplay, and queryEGLConfig().
Referenced by queryEGLConfig().
int gnash::renderer::EGLDevice::queryEGLConfig | ( | EGLDisplay | display | ) |
Query the system for all supported configs.
References _, getErrorString(), GNASH_REPORT_FUNCTION, gnash::key::i, and printEGLConfig().
void gnash::renderer::EGLDevice::setAttrib | ( | int | bpp | ) |
References _attrib.
Referenced by EGLDevice().
|
virtual |
Is the specified renderer supported by this hardware ?
Implements gnash::renderer::GnashDevice.
References _eglContext, _eglDisplay, GNASH_REPORT_FUNCTION, gnash::renderer::GnashDevice::OPENGLES1, gnash::renderer::GnashDevice::OPENGLES2, and gnash::renderer::GnashDevice::OPENVG.
|
inlinevirtual |
Reimplemented from gnash::renderer::GnashDevice.
References _eglDisplay, _eglSurface, and isSingleBuffered().
Referenced by gnash::gui::GtkOvgGlue::setRenderHandlerSize().
|
inline |
References _pbuffers.
|
protected |
Referenced by setAttrib().
|
protected |
Referenced by checkEGLConfig(), and EGLDevice().
|
protected |
|
protected |
|
protected |
Referenced by attachWindow(), checkEGLConfig(), copyPbuffers(), createPbuffer(), createPixmap(), getBlueSize(), getContextID(), getDepth(), getGreenSize(), getHeight(), getHorzRes(), getMaxSwapInterval(), getMinSwapInterval(), getRedSize(), getSampleBuffers(), getSamples(), getSurfaceID(), getVerticalRes(), getWidth(), initDevice(), isBackBuffered(), isBufferDestroyed(), isContextBackBuffered(), isContextSingleBuffered(), isMultiSample(), isNativeRender(), isSingleBuffered(), makePbufferCurrent(), printEGLConfig(), printEGLContext(), printEGLSurface(), queryEGLConfig(), supportsRenderer(), swapBuffers(), and ~EGLDevice().
|
protected |
|
protected |
|
protected |
Referenced by attachWindow().
|
protected |
Referenced by copyPbuffers(), createPbuffer(), createPixmap(), makePbufferCurrent(), operator[](), totalPbuffers(), and ~EGLDevice().
|
protected |
Referenced by initDevice().