Go to the documentation of this file.
20 #ifndef __EGL_DEVICE_H__
21 #define __EGL_DEVICE_H__ 1
37 # error "This file needs EGL, which is part of OpenGL-ES"
103 return static_cast<int>(value);
110 return static_cast<int>(value);
117 return static_cast<int>(value);
125 if (value == EGL_SINGLE_BUFFER) {
153 eglQuerySurface(
_eglDisplay, surface, EGL_WIDTH, &value);
155 return static_cast<size_t>(value);
160 eglQuerySurface(
_eglDisplay, surface, EGL_HEIGHT, &value);
162 return static_cast<size_t>(value);
166 eglQuerySurface(
_eglDisplay, surface, EGL_SWAP_BEHAVIOR, &value);
167 if (value == EGL_BUFFER_DESTROYED) {
172 #ifdef BUILD_X11_DEVICE
173 EGLint getNativeVisual();
214 NativePixmapType
pix;
216 log_error(
"eglCopyBuffers() failed (error 0x%x)", eglGetError());
227 log_error(
"eglMakeCurrent() failed (error 0x%x)", eglGetError());
238 log_error(
"eglMakeCurrent() failed (error 0x%x)", eglGetError());
252 return static_cast<size_t>(value);
259 return static_cast<size_t>(value);
265 if (value == EGL_BACK_BUFFER) {
277 if (value == EGL_MULTISAMPLE_RESOLVE_BOX) {
305 if (value == EGL_SINGLE_BUFFER) {
316 if (value == EGL_BACK_BUFFER) {
369 #define DUMP_CURRENT_SURFACE printEGLSurface(eglGetCurrentSurface(EGL_DRAW))
370 #define DUMP_CURRENT_CONTEXT printEGLContext(eglGetCurrentContext())
375 #endif // end of __EGL_DEVICE_H__
dtype_t getType()
Definition: eglDevice.h:66
static LogFile & getDefaultInstance()
Definition: log.cpp:77
EGLNativeWindowType _nativeWindow
Definition: eglDevice.h:361
BitmapData_as::iterator pix
Definition: BitmapData_as.cpp:568
bool isContextBackBuffered()
Definition: eglDevice.h:312
long native_window_t
Definition: GnashDevice.h:43
bool copyPbuffers(size_t x)
Definition: eglDevice.h:211
EGLSurface & operator[](int index)
Definition: eglDevice.h:197
quality_e
Definition: eglDevice.h:59
@ height
Definition: klash_part.cpp:329
bool makePbufferCurrent(size_t x)
Definition: eglDevice.h:234
size_t getWidth(EGLSurface surface)
Definition: eglDevice.h:150
Top-level gnash exception.
Definition: GnashException.h:31
bool isSingleBuffered()
Is this device single buffered.
Definition: eglDevice.h:120
bool attachWindow(GnashDevice::native_window_t window)
Definition: eglDevice.cpp:376
EGLint getSamples()
Definition: eglDevice.h:325
#define dbglogfile
Definition: gtkext.cpp:48
int getBlueSize()
Get the size of the Blue pixel.
Definition: eglDevice.h:112
void log_debug(StringType msg, Args... args)
Definition: log.h:301
bool isBufferDestroyed()
Are buffers destroyed ?
Definition: eglDevice.h:130
std::int32_t y
Definition: BitmapData_as.cpp:435
@ i
Definition: GnashKey.h:155
size_t getWidth()
Get the width of the device.
Definition: eglDevice.h:84
int queryEGLConfig()
Query the system for all supported configs.
Definition: eglDevice.h:180
bool bindClient(GnashDevice::rtype_t rtype)
Definition: eglDevice.cpp:332
#define _(String)
Definition: log.h:44
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
bool makePbufferCurrent()
Definition: eglDevice.h:224
EGLNativePixmapType _nativePixmap
Definition: eglDevice.h:362
int getID()
Get the window ID handle.
Definition: eglDevice.h:134
EGLint getContextID()
Definition: eglDevice.h:294
EGLSurface _eglSurface
Definition: eglDevice.h:359
#define GNASH_REPORT_FUNCTION
Definition: log.h:452
virtual ~EGLDevice()
Definition: eglDevice.cpp:131
quality_e _quality
Definition: eglDevice.h:363
@ OPENVG
Definition: GnashDevice.h:46
@ EGL
Definition: GnashDevice.h:48
int getRedSize()
Get the size of the Red pixel.
Definition: eglDevice.h:98
Definition: eglDevice.h:46
bool checkEGLConfig(EGLConfig config)
Check the requested EGl configuration against the current one.
Definition: eglDevice.cpp:475
void log_error(StringType msg, Args... args)
Definition: log.h:283
@ OPENGLES1
Definition: GnashDevice.h:46
size_t totalPbuffers()
Definition: eglDevice.h:196
bool supportsRenderer(GnashDevice::rtype_t rtype)
Is the specified renderer supported by this hardware ?
Definition: eglDevice.cpp:293
float _x
Definition: eglDevice.h:52
bool isContextSingleBuffered()
Definition: eglDevice.h:301
EGLint getSurfaceID()
Definition: eglDevice.h:285
Definition: GnashDevice.h:40
EGLDisplay _eglDisplay
Definition: eglDevice.h:360
EGLint getDepth()
Get the depth of the device.
Definition: eglDevice.h:92
type
Definition: GnashKey.h:330
void setAttrib(int bpp)
Definition: eglDevice.cpp:116
size_t getHeight(EGLSurface surface)
Definition: eglDevice.h:157
size_t getVerticalRes()
Definition: eglDevice.h:247
eglVertex(const point &p)
Definition: eglDevice.h:50
const EGLint * _attrib
Definition: eglDevice.h:364
bool isMultiSample()
Definition: eglDevice.h:273
EGLContext _eglContext
Definition: eglDevice.h:358
@ p
Definition: GnashKey.h:162
@ HIGH
Definition: eglDevice.h:59
EGLint getSampleBuffers()
Definition: eglDevice.h:332
@ LOW
Definition: eglDevice.h:59
bool swapBuffers()
Definition: eglDevice.h:204
bool isNativeRender()
Is this renderering natively.
Definition: eglDevice.h:140
eglVertex(float x, float y)
Definition: eglDevice.h:47
2D Point class
Definition: Point2d.h:39
EGLDevice()
Definition: eglDevice.cpp:50
EGLConfig _eglConfig
Definition: eglDevice.h:357
@ XORG
Definition: GnashDevice.h:46
std::vector< EGLSurface > _pbuffers
Definition: eglDevice.h:366
@ VAAPI
Definition: GnashDevice.h:46
bool initDevice(int argc, char *argv[])
Definition: eglDevice.cpp:169
size_t getHorzRes()
Definition: eglDevice.h:254
bool isBackBuffered()
Definition: eglDevice.h:261
size_t getStride()
Query the system for all supported configs.
Definition: eglDevice.h:78
EGLSurface createPixmap(int width, int height, NativePixmapType buf)
Definition: eglDevice.cpp:808
EGLint getMaxSwapInterval()
Definition: eglDevice.h:339
void printEGLSurface()
Definition: eglDevice.h:188
Definition: eglDevice.h:57
@ OPENGLES2
Definition: GnashDevice.h:46
void printEGLContext()
Definition: eglDevice.h:186
struct lirc_config * config
Definition: lirc_ext.cpp:43
EGLSurface createPbuffer(int width, int height)
Definition: eglDevice.cpp:767
const EGLint surface_attributes[]
Definition: configTemplates.h:183
bool isBufferDestroyed(EGLSurface surface)
Definition: eglDevice.h:164
void printEGLConfig()
Definition: eglDevice.h:184
rtype_t
The list of supported renders that use devices.
Definition: GnashDevice.h:46
int getGreenSize()
Get the size of the Green pixel.
Definition: eglDevice.h:105
@ width
Definition: klash_part.cpp:329
float _y
Definition: eglDevice.h:53
std::int32_t x
Definition: BitmapData_as.cpp:434
static EGLint getRenderableTypes()
Definition: eglDevice.cpp:830
EGLint getMinSwapInterval()
Definition: eglDevice.h:346
size_t getHeight()
Get the Height of the device.
Definition: eglDevice.h:88
unsigned int _bpp
Definition: eglDevice.h:365
@ MEDIUM
Definition: eglDevice.h:59
const char * getErrorString(int error)
Return a string with the error code as text, instead of a numeric value.
Definition: eglDevice.cpp:436
void printEGLAttribs(const EGLint *attrib)
Definition: eglDevice.cpp:581