projects
/
platform
/
core
/
uifw
/
dali-adaptor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert "[Tizen] Implement partial update"
[platform/core/uifw/dali-adaptor.git]
/
dali
/
internal
/
graphics
/
gles
/
egl-implementation.cpp
diff --git
a/dali/internal/graphics/gles/egl-implementation.cpp
b/dali/internal/graphics/gles/egl-implementation.cpp
index
3885134
..
3234393
100755
(executable)
--- a/
dali/internal/graphics/gles/egl-implementation.cpp
+++ b/
dali/internal/graphics/gles/egl-implementation.cpp
@@
-35,6
+35,7
@@
namespace
{
namespace
{
+ const uint32_t THRESHOLD_SWAPBUFFER_COUNT = 5;
const uint32_t CHECK_EXTENSION_NUMBER = 2;
const std::string EGL_KHR_SURFACELESS_CONTEXT = "EGL_KHR_surfaceless_context";
const std::string EGL_KHR_CREATE_CONTEXT = "EGL_KHR_create_context";
const uint32_t CHECK_EXTENSION_NUMBER = 2;
const std::string EGL_KHR_SURFACELESS_CONTEXT = "EGL_KHR_surfaceless_context";
const std::string EGL_KHR_CREATE_CONTEXT = "EGL_KHR_create_context";
@@
-81,7
+82,8
@@
EglImplementation::EglImplementation( int multiSamplingLevel,
mDepthBufferRequired( depthBufferRequired == Integration::DepthBufferAvailable::TRUE ),
mStencilBufferRequired( stencilBufferRequired == Integration::StencilBufferAvailable::TRUE ),
mIsSurfacelessContextSupported( false ),
mDepthBufferRequired( depthBufferRequired == Integration::DepthBufferAvailable::TRUE ),
mStencilBufferRequired( stencilBufferRequired == Integration::StencilBufferAvailable::TRUE ),
mIsSurfacelessContextSupported( false ),
- mIsKhrCreateContextSupported( false )
+ mIsKhrCreateContextSupported( false ),
+ mSwapBufferCountAfterResume( 0 )
{
}
{
}
@@
-310,7
+312,22
@@
void EglImplementation::SwapBuffers( EGLSurface& eglSurface )
{
if ( eglSurface != EGL_NO_SURFACE ) // skip if using surfaceless context
{
{
if ( eglSurface != EGL_NO_SURFACE ) // skip if using surfaceless context
{
+#ifndef DALI_PROFILE_UBUNTU
+ if( mSwapBufferCountAfterResume < THRESHOLD_SWAPBUFFER_COUNT )
+ {
+ DALI_LOG_RELEASE_INFO( "EglImplementation::SwapBuffers started.\n" );
+ }
+#endif //DALI_PROFILE_UBUNTU
+
eglSwapBuffers( mEglDisplay, eglSurface );
eglSwapBuffers( mEglDisplay, eglSurface );
+
+#ifndef DALI_PROFILE_UBUNTU
+ if( mSwapBufferCountAfterResume < THRESHOLD_SWAPBUFFER_COUNT )
+ {
+ DALI_LOG_RELEASE_INFO( "EglImplementation::SwapBuffers finished.\n" );
+ mSwapBufferCountAfterResume++;
+ }
+#endif //DALI_PROFILE_UBUNTU
}
}
}
}
@@
-505,8
+522,11
@@
bool EglImplementation::ReplaceSurfaceWindow( EGLNativeWindowType window, EGLSur
// the surface is bound to the context, so set the context to null
MakeContextNull();
// the surface is bound to the context, so set the context to null
MakeContextNull();
- // destroy the surface
- DestroySurface( eglSurface );
+ if( eglSurface )
+ {
+ // destroy the surface
+ DestroySurface( eglSurface );
+ }
// create the EGL surface
EGLSurface newEglSurface = CreateSurfaceWindow( window, mColorDepth );
// create the EGL surface
EGLSurface newEglSurface = CreateSurfaceWindow( window, mColorDepth );
@@
-536,6
+556,11
@@
void EglImplementation::SetGlesVersion( const int32_t glesVersion )
mGlesVersion = glesVersion;
}
mGlesVersion = glesVersion;
}
+void EglImplementation::SetFirstFrameAfterResume()
+{
+ mSwapBufferCountAfterResume = 0;
+}
+
EGLDisplay EglImplementation::GetDisplay() const
{
return mEglDisplay;
EGLDisplay EglImplementation::GetDisplay() const
{
return mEglDisplay;