From: Heeyong Song Date: Tue, 6 Jul 2021 02:03:18 +0000 (+0900) Subject: [Tizen]Initialize surface before PreRender X-Git-Tag: accepted/tizen/unified/20210712.055823^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2084522269686db652ae2aa9d58e1dca7875ee22;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git [Tizen]Initialize surface before PreRender Change-Id: I76419b6e29a0c761b103c596441083bce134e614 --- 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);