Dali 3D User Interface Engine
List of all members | Public Member Functions | Private Attributes
Dali::Internal::Adaptor::EglImplementation Class Reference

EglImplementation class provides an EGL implementation. More...

#include <egl-implementation.h>

Inheritance diagram for Dali::Internal::Adaptor::EglImplementation:
Inheritance graph
[legend]
Collaboration diagram for Dali::Internal::Adaptor::EglImplementation:
Collaboration graph
[legend]

Public Member Functions

 EglImplementation ()
 Constructor. More...
 
virtual ~EglImplementation ()
 Destructor. More...
 
bool InitializeGles (EGLNativeDisplayType display, bool isOwnSurface=true)
 (Called from ECoreX::RenderSurface, not RenderThread, so not in i/f, hence, not virtual) Initialize GL More...
 
virtual bool CreateContext ()
 Create the OpenGL context. More...
 
void DestroyContext ()
 Destroy the OpenGL context. More...
 
void DestroySurface ()
 Destroy the OpenGL surface. More...
 
virtual void MakeContextCurrent ()
 Make the OpenGL context current. More...
 
void MakeContextNull ()
 clear the OpenGL context More...
 
void MakeCurrent (EGLNativePixmapType pixmap, EGLSurface eglSurface)
 Make the OpenGL surface current. More...
 
virtual void TerminateGles ()
 Terminate GL. More...
 
bool IsGlesInitialized () const
 Checks if GL is initialised. More...
 
virtual void SwapBuffers ()
 Performs an OpenGL swap buffers command. More...
 
virtual void CopyBuffers ()
 Performs an OpenGL copy buffers command. More...
 
virtual void WaitGL ()
 Performs an EGL wait GL command. More...
 
void ChooseConfig (bool isWindowType, ColorDepth depth)
 Choose config of egl. More...
 
void CreateSurfaceWindow (EGLNativeWindowType window, ColorDepth depth)
 Create an OpenGL surface using a window. More...
 
EGLSurface CreateSurfacePixmap (EGLNativePixmapType pixmap, ColorDepth depth)
 Create the OpenGL surface using a pixmap. More...
 
bool ReplaceSurfaceWindow (EGLNativeWindowType window)
 Replaces the render surface. More...
 
bool ReplaceSurfacePixmap (EGLNativePixmapType pixmap, EGLSurface &eglSurface)
 Replaces the render surface. More...
 
EGLDisplay GetDisplay () const
 returns the display with which this object was initialized More...
 
EGLContext GetContext () const
 Returns the EGL context. More...
 

Private Attributes

Vector< EGLint > mContextAttribs
 
EGLNativeDisplayType mEglNativeDisplay
 
EGLNativeWindowType mEglNativeWindow
 
EGLNativePixmapType mCurrentEglNativePixmap
 
EGLDisplay mEglDisplay
 
EGLConfig mEglConfig
 
EGLContext mEglContext
 
EGLSurface mCurrentEglSurface
 
bool mGlesInitialized
 
bool mIsOwnSurface
 
bool mContextCurrent
 
bool mIsWindow
 
ColorDepth mColorDepth
 

Detailed Description

EglImplementation class provides an EGL implementation.

Definition at line 40 of file egl-implementation.h.

Constructor & Destructor Documentation

Dali::Internal::Adaptor::EglImplementation::EglImplementation ( )

Constructor.

Definition at line 51 of file egl-implementation.cpp.

Dali::Internal::Adaptor::EglImplementation::~EglImplementation ( )
virtual

Destructor.

Definition at line 67 of file egl-implementation.cpp.

References TerminateGles().

Here is the call graph for this function:

Member Function Documentation

void Dali::Internal::Adaptor::EglImplementation::ChooseConfig ( bool  isWindowType,
ColorDepth  depth 
)

Choose config of egl.

Parameters
isWindowTypewhether the config for window or pixmap
colorDepthBit per pixel value (ex. 32 or 24)

Definition at line 261 of file egl-implementation.cpp.

References DALI_ASSERT_ALWAYS, DALI_LOG_ERROR, DALI_LOG_WARNING, mColorDepth, mEglConfig, mEglDisplay, mIsWindow, Dali::Vector< T, IsTrivialType >::PushBack(), Dali::Vector< T, IsTrivialType >::Reserve(), and TEST_EGL_ERROR.

Referenced by CreateSurfacePixmap(), and CreateSurfaceWindow().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::Adaptor::EglImplementation::CopyBuffers ( )
virtual

Performs an OpenGL copy buffers command.

Definition at line 251 of file egl-implementation.cpp.

References mCurrentEglNativePixmap, mCurrentEglSurface, and mEglDisplay.

bool Dali::Internal::Adaptor::EglImplementation::CreateContext ( )
virtual
EGLSurface Dali::Internal::Adaptor::EglImplementation::CreateSurfacePixmap ( EGLNativePixmapType  pixmap,
ColorDepth  depth 
)

Create the OpenGL surface using a pixmap.

Parameters
pixmapThe pixmap to create the surface on
colorDepthBit per pixel value (ex. 32 or 24)
Returns
Handle to an off-screen EGL pixmap surface (the requester has an ownership of this egl surface)

Definition at line 397 of file egl-implementation.cpp.

References ChooseConfig(), DALI_ASSERT_ALWAYS, mColorDepth, mCurrentEglNativePixmap, mCurrentEglSurface, mEglConfig, mEglDisplay, mIsWindow, and TEST_EGL_ERROR.

Referenced by ReplaceSurfacePixmap().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::Adaptor::EglImplementation::CreateSurfaceWindow ( EGLNativeWindowType  window,
ColorDepth  depth 
)

Create an OpenGL surface using a window.

Parameters
windowThe window to create the surface on
colorDepthBit per pixel value (ex. 32 or 24)
Returns
true on success, false on failure

Definition at line 380 of file egl-implementation.cpp.

References ChooseConfig(), DALI_ASSERT_ALWAYS, mColorDepth, mCurrentEglSurface, mEglConfig, mEglDisplay, mEglNativeWindow, mIsWindow, and TEST_EGL_ERROR.

Referenced by ReplaceSurfaceWindow().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::Adaptor::EglImplementation::DestroyContext ( )

Destroy the OpenGL context.

Definition at line 141 of file egl-implementation.cpp.

References DALI_ASSERT_ALWAYS, mEglContext, and mEglDisplay.

void Dali::Internal::Adaptor::EglImplementation::DestroySurface ( )

Destroy the OpenGL surface.

Definition at line 149 of file egl-implementation.cpp.

References mCurrentEglSurface, mEglDisplay, and mIsOwnSurface.

Referenced by ReplaceSurfaceWindow().

Here is the caller graph for this function:

EGLDisplay Dali::Internal::Adaptor::EglImplementation::GetContext ( ) const

Returns the EGL context.

Returns
the EGL context.

Definition at line 453 of file egl-implementation.cpp.

References mEglContext.

EGLDisplay Dali::Internal::Adaptor::EglImplementation::GetDisplay ( ) const

returns the display with which this object was initialized

Returns
the EGL Display.

Definition at line 448 of file egl-implementation.cpp.

References mEglDisplay.

Referenced by Dali::Internal::Adaptor::EglImageExtensions::CreateImageKHR(), and Dali::Internal::Adaptor::EglImageExtensions::DestroyImageKHR().

Here is the caller graph for this function:

bool Dali::Internal::Adaptor::EglImplementation::InitializeGles ( EGLNativeDisplayType  display,
bool  isOwnSurface = true 
)

(Called from ECoreX::RenderSurface, not RenderThread, so not in i/f, hence, not virtual) Initialize GL

Parameters
displayThe display
isOwnSurfacewhether the surface is own or not
Returns
true on success, false on failure

Definition at line 72 of file egl-implementation.cpp.

References Dali::Vector< T, IsTrivialType >::Clear(), mContextAttribs, mEglDisplay, mEglNativeDisplay, mGlesInitialized, mIsOwnSurface, Dali::Vector< T, IsTrivialType >::PushBack(), and Dali::Vector< T, IsTrivialType >::Reserve().

Here is the call graph for this function:

bool Dali::Internal::Adaptor::EglImplementation::IsGlesInitialized ( ) const

Checks if GL is initialised.

Returns
true if it is

Definition at line 241 of file egl-implementation.cpp.

References mGlesInitialized.

void Dali::Internal::Adaptor::EglImplementation::MakeContextCurrent ( )
virtual

Make the OpenGL context current.

Definition at line 158 of file egl-implementation.cpp.

References DALI_ASSERT_ALWAYS, Dali::Integration::Log::DebugInfo, Dali::Integration::Log::LogMessage(), mContextCurrent, mCurrentEglSurface, mEglContext, mEglDisplay, mIsOwnSurface, and Dali::Internal::Adaptor::Egl::PrintError().

Referenced by ReplaceSurfaceWindow().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::Adaptor::EglImplementation::MakeContextNull ( )

clear the OpenGL context

Definition at line 208 of file egl-implementation.cpp.

References mContextCurrent, and mEglDisplay.

Referenced by ReplaceSurfaceWindow(), and TerminateGles().

Here is the caller graph for this function:

void Dali::Internal::Adaptor::EglImplementation::MakeCurrent ( EGLNativePixmapType  pixmap,
EGLSurface  eglSurface 
)

Make the OpenGL surface current.

Parameters
pixmapThe pixmap to replace the current surface
eglSurfaceThe eglSurface to replace the current OpenGL surface.

Definition at line 188 of file egl-implementation.cpp.

References DALI_ASSERT_ALWAYS, mCurrentEglNativePixmap, mCurrentEglSurface, mEglContext, mEglDisplay, mIsOwnSurface, and Dali::Internal::Adaptor::Egl::PrintError().

Referenced by ReplaceSurfacePixmap().

Here is the call graph for this function:

Here is the caller graph for this function:

bool Dali::Internal::Adaptor::EglImplementation::ReplaceSurfacePixmap ( EGLNativePixmapType  pixmap,
EGLSurface &  eglSurface 
)

Replaces the render surface.

Parameters
[in]pixmap,thepixmap to replace the new surface on
[out]eglSurface,theeglSurface is created using a pixmap.
Returns
true if the context was lost due to a change in x-display between old surface and new surface

Definition at line 434 of file egl-implementation.cpp.

References CreateSurfacePixmap(), MakeCurrent(), and mColorDepth.

Here is the call graph for this function:

bool Dali::Internal::Adaptor::EglImplementation::ReplaceSurfaceWindow ( EGLNativeWindowType  window)

Replaces the render surface.

Parameters
[in]window,thewindow to create the new surface on
Returns
true if the context was lost due to a change in display between old surface and new surface

Definition at line 414 of file egl-implementation.cpp.

References CreateSurfaceWindow(), DestroySurface(), MakeContextCurrent(), MakeContextNull(), and mColorDepth.

Here is the call graph for this function:

void Dali::Internal::Adaptor::EglImplementation::SwapBuffers ( )
virtual

Performs an OpenGL swap buffers command.

Definition at line 246 of file egl-implementation.cpp.

References mCurrentEglSurface, and mEglDisplay.

void Dali::Internal::Adaptor::EglImplementation::TerminateGles ( )
virtual

Terminate GL.

Definition at line 215 of file egl-implementation.cpp.

References MakeContextNull(), mCurrentEglSurface, mEglConfig, mEglContext, mEglDisplay, mGlesInitialized, and mIsOwnSurface.

Referenced by ~EglImplementation().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::Adaptor::EglImplementation::WaitGL ( )
virtual

Performs an EGL wait GL command.

Definition at line 256 of file egl-implementation.cpp.

Member Data Documentation

ColorDepth Dali::Internal::Adaptor::EglImplementation::mColorDepth
private
Vector<EGLint> Dali::Internal::Adaptor::EglImplementation::mContextAttribs
private

Definition at line 178 of file egl-implementation.h.

Referenced by CreateContext(), and InitializeGles().

bool Dali::Internal::Adaptor::EglImplementation::mContextCurrent
private

Definition at line 193 of file egl-implementation.h.

Referenced by MakeContextCurrent(), and MakeContextNull().

EGLNativePixmapType Dali::Internal::Adaptor::EglImplementation::mCurrentEglNativePixmap
private

Definition at line 184 of file egl-implementation.h.

Referenced by CopyBuffers(), CreateSurfacePixmap(), and MakeCurrent().

EGLSurface Dali::Internal::Adaptor::EglImplementation::mCurrentEglSurface
private
EGLConfig Dali::Internal::Adaptor::EglImplementation::mEglConfig
private
EGLContext Dali::Internal::Adaptor::EglImplementation::mEglContext
private
EGLDisplay Dali::Internal::Adaptor::EglImplementation::mEglDisplay
private
EGLNativeDisplayType Dali::Internal::Adaptor::EglImplementation::mEglNativeDisplay
private

Definition at line 180 of file egl-implementation.h.

Referenced by InitializeGles().

EGLNativeWindowType Dali::Internal::Adaptor::EglImplementation::mEglNativeWindow
private

Definition at line 182 of file egl-implementation.h.

Referenced by CreateSurfaceWindow().

bool Dali::Internal::Adaptor::EglImplementation::mGlesInitialized
private

Definition at line 191 of file egl-implementation.h.

Referenced by InitializeGles(), IsGlesInitialized(), and TerminateGles().

bool Dali::Internal::Adaptor::EglImplementation::mIsOwnSurface
private
bool Dali::Internal::Adaptor::EglImplementation::mIsWindow
private

Definition at line 194 of file egl-implementation.h.

Referenced by ChooseConfig(), CreateSurfacePixmap(), and CreateSurfaceWindow().


The documentation for this class was generated from the following files:
Dali Docs Home
Read more about Dali