From: Daekwang Ryu Date: Mon, 19 Jul 2021 06:20:25 +0000 (+0900) Subject: Revert "[Tizen] Initialize surface before PreRender" X-Git-Tag: accepted/tizen/unified/20210720.123600~6 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git;a=commitdiff_plain;h=c16dd2637c2221f603cdccbe0db4788cc856a769 Revert "[Tizen] Initialize surface before PreRender" This reverts commit a6cf73c468a7e1e576e6b743839e268320e48201. --- diff --git a/dali/internal/adaptor/common/combined-update-render-controller.cpp b/dali/internal/adaptor/common/combined-update-render-controller.cpp index 3349b76..356cec0 100644 --- a/dali/internal/adaptor/common/combined-update-render-controller.cpp +++ b/dali/internal/adaptor/common/combined-update-render-controller.cpp @@ -701,8 +701,6 @@ void CombinedUpdateRenderController::UpdateRenderThread() Rect clippingRect; // Empty for fbo rendering - windowSurface->InitializeGraphics(); - // Switch to the context of the surface, merge damaged areas for previous frames windowSurface->PreRender(sceneSurfaceResized, mDamagedRects, clippingRect); // Switch GL context diff --git a/dali/internal/graphics/gles/egl-graphics.cpp b/dali/internal/graphics/gles/egl-graphics.cpp index 0ffb315..62563e1 100644 --- a/dali/internal/graphics/gles/egl-graphics.cpp +++ b/dali/internal/graphics/gles/egl-graphics.cpp @@ -86,6 +86,7 @@ void EglGraphics::ActivateSurfaceContext(Dali::RenderSurfaceInterface* surface) { if(surface) { + surface->InitializeGraphics(); surface->MakeContextCurrent(); } @@ -169,7 +170,6 @@ void EglGraphics::ConfigureSurface(Dali::RenderSurfaceInterface* surface) currentSurface = surface; if(currentSurface) { - currentSurface->InitializeGraphics(); ActivateSurfaceContext(currentSurface); } } diff --git a/dali/internal/window-system/common/window-render-surface.cpp b/dali/internal/window-system/common/window-render-surface.cpp index 05f0a29..b1ba7a1 100644 --- a/dali/internal/window-system/common/window-render-surface.cpp +++ b/dali/internal/window-system/common/window-render-surface.cpp @@ -223,7 +223,7 @@ void WindowRenderSurface::RequestRotation(int angle, int width, int height) mWindowRotationAngle = angle; mWindowRotationFinished = false; - mResizeFinished = false; + mResizeFinished = false; mWindowBase->SetWindowRotationAngle(mWindowRotationAngle); @@ -272,15 +272,15 @@ int WindowRenderSurface::GetOrientation() const void WindowRenderSurface::InitializeGraphics() { - if(mEGLContext == NULL) - { - mGraphics = &mAdaptor->GetGraphicsInterface(); + mGraphics = &mAdaptor->GetGraphicsInterface(); - DALI_ASSERT_ALWAYS(mGraphics && "Graphics interface is not created"); + DALI_ASSERT_ALWAYS(mGraphics && "Graphics interface is not created"); - auto eglGraphics = static_cast(mGraphics); - mEGL = &eglGraphics->GetEglInterface(); + auto eglGraphics = static_cast(mGraphics); + mEGL = &eglGraphics->GetEglInterface(); + if(mEGLContext == NULL) + { // Create the OpenGL context for this window Internal::Adaptor::EglImplementation& eglImpl = static_cast(*mEGL); eglImpl.ChooseConfig(true, mColorDepth);