Revert "[Tizen]Initialize surface before PreRender"
authorSeoyeon Kim <seoyeon2.kim@samsung.com>
Tue, 13 Jul 2021 05:03:21 +0000 (14:03 +0900)
committerSeoyeon Kim <seoyeon2.kim@samsung.com>
Tue, 13 Jul 2021 05:03:21 +0000 (14:03 +0900)
This reverts commit 2084522269686db652ae2aa9d58e1dca7875ee22.

dali/internal/adaptor/common/combined-update-render-controller.cpp
dali/internal/graphics/gles/egl-graphics.cpp
dali/internal/window-system/common/window-render-surface.cpp

index 3349b76..356cec0 100644 (file)
@@ -701,8 +701,6 @@ void CombinedUpdateRenderController::UpdateRenderThread()
 
           Rect<int> 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
 
index 0ffb315..62563e1 100644 (file)
@@ -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);
     }
   }
index 05f0a29..b1ba7a1 100644 (file)
@@ -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<EglGraphics*>(mGraphics);
-    mEGL             = &eglGraphics->GetEglInterface();
+  auto eglGraphics = static_cast<EglGraphics*>(mGraphics);
+  mEGL             = &eglGraphics->GetEglInterface();
 
+  if(mEGLContext == NULL)
+  {
     // Create the OpenGL context for this window
     Internal::Adaptor::EglImplementation& eglImpl = static_cast<Internal::Adaptor::EglImplementation&>(*mEGL);
     eglImpl.ChooseConfig(true, mColorDepth);