Gnash  0.8.11dev
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
gnash::renderer::EGLDevice Class Reference

#include <eglDevice.h>

Inheritance diagram for gnash::renderer::EGLDevice:
gnash::renderer::GnashDevice gnash::renderer::gles1::Renderer_gles1

Public Types

enum  quality_e { LOW, MEDIUM, HIGH }
 
- Public Types inherited from gnash::renderer::GnashDevice
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
 

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)
 
- Public Member Functions inherited from gnash::renderer::GnashDevice
 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 ()
 

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
 

Member Enumeration Documentation

§ quality_e

Enumerator
LOW 
MEDIUM 
HIGH 

Constructor & Destructor Documentation

§ EGLDevice() [1/3]

gnash::renderer::EGLDevice::EGLDevice ( )

§ EGLDevice() [2/3]

gnash::renderer::EGLDevice::EGLDevice ( int  argc,
char *  argv[] 
)

§ EGLDevice() [3/3]

gnash::renderer::EGLDevice::EGLDevice ( GnashDevice::rtype_t  rtype)

§ ~EGLDevice()

gnash::renderer::EGLDevice::~EGLDevice ( )
virtual

Member Function Documentation

§ attachWindow()

bool gnash::renderer::EGLDevice::attachWindow ( GnashDevice::native_window_t  window)
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, gnash::log_debug(), gnash::log_error(), printEGLContext(), printEGLSurface(), and gnash::renderer::surface_attributes.

Referenced by main().

§ bindClient()

bool gnash::renderer::EGLDevice::bindClient ( GnashDevice::rtype_t  rtype)
virtual

§ checkEGLConfig()

bool gnash::renderer::EGLDevice::checkEGLConfig ( EGLConfig  config)

Check the requested EGl configuration against the current one.

References _bpp, and _eglDisplay.

Referenced by initDevice().

§ copyPbuffers()

bool gnash::renderer::EGLDevice::copyPbuffers ( size_t  x)
inline

§ createPbuffer() [1/2]

EGLSurface gnash::renderer::EGLDevice::createPbuffer ( int  width,
int  height 
)

§ createPbuffer() [2/2]

EGLSurface gnash::renderer::EGLDevice::createPbuffer ( int  width,
int  height,
EGLClientBuffer  buf,
EGLenum  type 
)

§ createPixmap()

EGLSurface gnash::renderer::EGLDevice::createPixmap ( int  width,
int  height,
NativePixmapType  buf 
)

§ getBlueSize()

int gnash::renderer::EGLDevice::getBlueSize ( )
inlinevirtual

Get the size of the Blue pixel.

Implements gnash::renderer::GnashDevice.

§ getContextID()

EGLint gnash::renderer::EGLDevice::getContextID ( )
inline

§ getDepth()

EGLint gnash::renderer::EGLDevice::getDepth ( )
inlinevirtual

Get the depth of the device.

Implements gnash::renderer::GnashDevice.

§ getErrorString()

const char * gnash::renderer::EGLDevice::getErrorString ( int  error)
virtual

Return a string with the error code as text, instead of a numeric value.

Implements gnash::renderer::GnashDevice.

Referenced by attachWindow(), bindClient(), initDevice(), queryEGLConfig(), and supportsRenderer().

§ getGreenSize()

int gnash::renderer::EGLDevice::getGreenSize ( )
inlinevirtual

Get the size of the Green pixel.

Implements gnash::renderer::GnashDevice.

§ getHeight() [1/2]

size_t gnash::renderer::EGLDevice::getHeight ( )
inlinevirtual

Get the Height of the device.

Implements gnash::renderer::GnashDevice.

References gnash::getHeight().

§ getHeight() [2/2]

size_t gnash::renderer::EGLDevice::getHeight ( EGLSurface  surface)
inline

§ getHorzRes()

size_t gnash::renderer::EGLDevice::getHorzRes ( )
inline

§ getID()

int gnash::renderer::EGLDevice::getID ( )
inlinevirtual

Get the window ID handle.

Implements gnash::renderer::GnashDevice.

§ getMaxSwapInterval()

EGLint gnash::renderer::EGLDevice::getMaxSwapInterval ( )
inline

§ getMinSwapInterval()

EGLint gnash::renderer::EGLDevice::getMinSwapInterval ( )
inline

§ getRedSize()

int gnash::renderer::EGLDevice::getRedSize ( )
inlinevirtual

Get the size of the Red pixel.

Implements gnash::renderer::GnashDevice.

§ getRenderableTypes()

EGLint gnash::renderer::EGLDevice::getRenderableTypes ( )
static

§ getSampleBuffers()

EGLint gnash::renderer::EGLDevice::getSampleBuffers ( )
inline

§ getSamples()

EGLint gnash::renderer::EGLDevice::getSamples ( )
inline

§ getStride()

size_t gnash::renderer::EGLDevice::getStride ( )
inlinevirtual

Query the system for all supported configs.

Get the stride of the device

Implements gnash::renderer::GnashDevice.

§ getSurfaceID()

EGLint gnash::renderer::EGLDevice::getSurfaceID ( )
inline

§ getType()

dtype_t gnash::renderer::EGLDevice::getType ( )
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.

§ getVerticalRes()

size_t gnash::renderer::EGLDevice::getVerticalRes ( )
inline

§ getWidth() [1/2]

size_t gnash::renderer::EGLDevice::getWidth ( )
inlinevirtual

Get the width of the device.

Implements gnash::renderer::GnashDevice.

§ getWidth() [2/2]

size_t gnash::renderer::EGLDevice::getWidth ( EGLSurface  surface)
inline

§ initDevice()

bool gnash::renderer::EGLDevice::initDevice ( int  argc,
char *  argv[] 
)
virtual
Note
: There are a few steps required to initialize an EGL Device. This uses threee methods to do so, two are defaults from the base class, one is an additional class that is EGL specific.

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(), getErrorString(), GNASH_REPORT_FUNCTION, HIGH, gnash::log_debug(), gnash::log_error(), LOW, MEDIUM, and printEGLConfig().

Referenced by EGLDevice(), main(), and gnash::renderer::gles1::Renderer_gles1::Renderer_gles1().

§ isBackBuffered()

bool gnash::renderer::EGLDevice::isBackBuffered ( )
inline

§ isBufferDestroyed() [1/2]

bool gnash::renderer::EGLDevice::isBufferDestroyed ( )
inlinevirtual

Are buffers destroyed ?

Implements gnash::renderer::GnashDevice.

§ isBufferDestroyed() [2/2]

bool gnash::renderer::EGLDevice::isBufferDestroyed ( EGLSurface  surface)
inline

References gnash::config.

§ isContextBackBuffered()

bool gnash::renderer::EGLDevice::isContextBackBuffered ( )
inline

§ isContextSingleBuffered()

bool gnash::renderer::EGLDevice::isContextSingleBuffered ( )
inline

§ isMultiSample()

bool gnash::renderer::EGLDevice::isMultiSample ( )
inline

§ isNativeRender()

bool gnash::renderer::EGLDevice::isNativeRender ( )
inlinevirtual

Is this renderering natively.

Implements gnash::renderer::GnashDevice.

§ isSingleBuffered()

bool gnash::renderer::EGLDevice::isSingleBuffered ( )
inlinevirtual

Is this device single buffered.

Implements gnash::renderer::GnashDevice.

§ makePbufferCurrent() [1/2]

bool gnash::renderer::EGLDevice::makePbufferCurrent ( )
inline

References gnash::log_error().

§ makePbufferCurrent() [2/2]

bool gnash::renderer::EGLDevice::makePbufferCurrent ( size_t  x)
inline

References gnash::log_error().

§ operator[]()

EGLSurface& gnash::renderer::EGLDevice::operator[] ( int  index)
inline

§ printEGLAttribs()

void gnash::renderer::EGLDevice::printEGLAttribs ( const EGLint *  attrib)

References gnash::key::i.

§ printEGLConfig() [1/2]

void gnash::renderer::EGLDevice::printEGLConfig ( )
inline

§ printEGLConfig() [2/2]

void gnash::renderer::EGLDevice::printEGLConfig ( EGLConfig  config)

References _eglDisplay.

§ printEGLContext() [1/2]

void gnash::renderer::EGLDevice::printEGLContext ( )
inline

§ printEGLContext() [2/2]

void gnash::renderer::EGLDevice::printEGLContext ( EGLContext  context)

References _eglDisplay.

§ printEGLSurface() [1/2]

void gnash::renderer::EGLDevice::printEGLSurface ( )
inline

§ printEGLSurface() [2/2]

void gnash::renderer::EGLDevice::printEGLSurface ( EGLSurface  surface)

References _eglDisplay.

§ queryEGLConfig() [1/2]

int gnash::renderer::EGLDevice::queryEGLConfig ( )
inline

Query the system for all supported configs.

References queryEGLConfig().

Referenced by queryEGLConfig().

§ queryEGLConfig() [2/2]

int gnash::renderer::EGLDevice::queryEGLConfig ( EGLDisplay  display)

Query the system for all supported configs.

References _, getErrorString(), GNASH_REPORT_FUNCTION, gnash::key::i, gnash::log_debug(), gnash::log_error(), and printEGLConfig().

§ setAttrib()

void gnash::renderer::EGLDevice::setAttrib ( int  bpp)

References _attrib.

Referenced by EGLDevice().

§ supportsRenderer()

bool gnash::renderer::EGLDevice::supportsRenderer ( GnashDevice::rtype_t  rtype)
virtual

§ swapBuffers()

bool gnash::renderer::EGLDevice::swapBuffers ( )
inlinevirtual

§ totalPbuffers()

size_t gnash::renderer::EGLDevice::totalPbuffers ( )
inline

Member Data Documentation

§ _attrib

const EGLint* gnash::renderer::EGLDevice::_attrib
protected

Referenced by setAttrib().

§ _bpp

unsigned int gnash::renderer::EGLDevice::_bpp
protected

Referenced by checkEGLConfig(), and EGLDevice().

§ _eglConfig

EGLConfig gnash::renderer::EGLDevice::_eglConfig
protected

§ _eglContext

EGLContext gnash::renderer::EGLDevice::_eglContext
protected

§ _eglDisplay

EGLDisplay gnash::renderer::EGLDevice::_eglDisplay
protected

§ _eglSurface

EGLSurface gnash::renderer::EGLDevice::_eglSurface
protected

Referenced by attachWindow(), and ~EGLDevice().

§ _nativePixmap

EGLNativePixmapType gnash::renderer::EGLDevice::_nativePixmap
protected

§ _nativeWindow

EGLNativeWindowType gnash::renderer::EGLDevice::_nativeWindow
protected

Referenced by attachWindow().

§ _pbuffers

std::vector<EGLSurface> gnash::renderer::EGLDevice::_pbuffers
protected

§ _quality

quality_e gnash::renderer::EGLDevice::_quality
protected

Referenced by initDevice().


The documentation for this class was generated from the following files: