X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=adaptors%2Fcommon%2Fgl%2Fegl-implementation.h;h=4081ed3df199bfa147c553c0a8811f23639e2be2;hb=3e0170db1aa381d3a26f0c2b54f924dfda2dccc8;hp=972b44132a316e19dc69666bc4aa791976ca6c7c;hpb=30c75259aa5c7efc846d69ccdb293ca9e836aca0;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/adaptors/common/gl/egl-implementation.h b/adaptors/common/gl/egl-implementation.h index 972b441..4081ed3 100644 --- a/adaptors/common/gl/egl-implementation.h +++ b/adaptors/common/gl/egl-implementation.h @@ -2,7 +2,7 @@ #define __DALI_INTERNAL_EGL_IMPLEMENTATION_H__ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,25 +21,19 @@ // EXTERNAL INCLUDES #include #include -#include #include // INTERNAL INCLUDES -#include +#include namespace Dali { + namespace Internal { namespace Adaptor { -enum ColorDepth -{ - COLOR_DEPTH_24 = 24, - COLOR_DEPTH_32 = 32 -}; - /** * EglImplementation class provides an EGL implementation. */ @@ -48,8 +42,9 @@ class EglImplementation : public EglInterface public: /** * Constructor + * @param environmentOptions To check the envirionment options */ - EglImplementation(); + EglImplementation( int multiSamplingLevel ); /** * Destructor @@ -58,7 +53,7 @@ public: public: - /** + /** * (Called from ECoreX::RenderSurface, not RenderThread, so not in i/f, hence, not virtual) * Initialize GL * @param display The display @@ -94,6 +89,14 @@ public: void MakeContextNull(); /** + * @brief Make the OpenGL surface current + * + * @param pixmap The pixmap to replace the current surface + * @param eglSurface The eglSurface to replace the current OpenGL surface. + */ + void MakeCurrent( EGLNativePixmapType pixmap, EGLSurface eglSurface ); + + /** * Terminate GL */ virtual void TerminateGles(); @@ -105,12 +108,6 @@ public: bool IsGlesInitialized() const; /** - * Sets the refresh sync mode. - * @see SyncMode - */ - virtual bool SetRefreshSync( SyncMode mode ); - - /** * Performs an OpenGL swap buffers command */ virtual void SwapBuffers(); @@ -144,27 +141,26 @@ public: * Create the OpenGL surface using a pixmap * @param pixmap The pixmap to create the surface on * @param colorDepth Bit per pixel value (ex. 32 or 24) - * @return true on success, false on failure + * @return Handle to an off-screen EGL pixmap surface (the requester has an ownership of this egl surface) */ - void CreateSurfacePixmap( EGLNativePixmapType pixmap, ColorDepth depth ); + EGLSurface CreateSurfacePixmap( EGLNativePixmapType pixmap, ColorDepth depth ); /** * Replaces the render surface * @param[in] window, the window to create the new surface on - * @param[in] display, the display * @return true if the context was lost due to a change in display * between old surface and new surface */ - bool ReplaceSurfaceWindow( EGLNativeWindowType window, EGLNativeDisplayType display ); + bool ReplaceSurfaceWindow( EGLNativeWindowType window ); /** * Replaces the render surface - * @param[in] pixmap, the pixmap to create the new surface on - * @param[in] display, the display + * @param[in] pixmap, the pixmap to replace the new surface on + * @param[out] eglSurface, the eglSurface is created using a pixmap. * @return true if the context was lost due to a change in x-display * between old surface and new surface */ - bool ReplaceSurfacePixmap( EGLNativePixmapType pixmap, EGLNativeDisplayType display ); + bool ReplaceSurfacePixmap( EGLNativePixmapType pixmap, EGLSurface& eglSurface ); /** * returns the display with which this object was initialized @@ -183,20 +179,23 @@ private: Vector mContextAttribs; EGLNativeDisplayType mEglNativeDisplay; + EGLNativeWindowType mEglNativeWindow; - EGLNativePixmapType mEglNativePixmap; + + EGLNativePixmapType mCurrentEglNativePixmap; EGLDisplay mEglDisplay; EGLConfig mEglConfig; EGLContext mEglContext; - EGLSurface mEglSurface; + EGLSurface mCurrentEglSurface; bool mGlesInitialized; bool mIsOwnSurface; - SyncMode mSyncMode; bool mContextCurrent; bool mIsWindow; ColorDepth mColorDepth; + + int mMultiSamplingLevel; }; } // namespace Adaptor