From: Seoyeon Kim Date: Tue, 13 Jul 2021 05:04:58 +0000 (+0900) Subject: [Tizen] Initialize surface before PreRender X-Git-Tag: accepted/tizen/unified/20210713.124152^0 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git;a=commitdiff_plain;h=a6cf73c468a7e1e576e6b743839e268320e48201 [Tizen] Initialize surface before PreRender This reverts commit 18e8a56cdc611d6e7c019a82799bc1571d8b1796. --- diff --git a/dali/internal/adaptor/common/combined-update-render-controller.cpp b/dali/internal/adaptor/common/combined-update-render-controller.cpp index 356cec0..3349b76 100644 --- a/dali/internal/adaptor/common/combined-update-render-controller.cpp +++ b/dali/internal/adaptor/common/combined-update-render-controller.cpp @@ -701,6 +701,8 @@ 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 62563e1..0ffb315 100644 --- a/dali/internal/graphics/gles/egl-graphics.cpp +++ b/dali/internal/graphics/gles/egl-graphics.cpp @@ -86,7 +86,6 @@ void EglGraphics::ActivateSurfaceContext(Dali::RenderSurfaceInterface* surface) { if(surface) { - surface->InitializeGraphics(); surface->MakeContextCurrent(); } @@ -170,6 +169,7 @@ 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 b1ba7a1..05f0a29 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() { - mGraphics = &mAdaptor->GetGraphicsInterface(); + if(mEGLContext == NULL) + { + 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);