X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fadaptor%2Fcommon%2Fcombined-update-render-controller.cpp;h=356cec057b2758d944da9f412fd5e87d0e877a61;hb=d016d5b607229f9de13e9754a57c68b4d31c586d;hp=2f970cb1700138f2722853aae2e47468a6257b1a;hpb=75bb62edc66d7a1c9b070f576fe570aa92d81f8f;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/adaptor/common/combined-update-render-controller.cpp b/dali/internal/adaptor/common/combined-update-render-controller.cpp index 2f970cb..356cec0 100644 --- a/dali/internal/adaptor/common/combined-update-render-controller.cpp +++ b/dali/internal/adaptor/common/combined-update-render-controller.cpp @@ -574,8 +574,7 @@ void CombinedUpdateRenderController::UpdateRenderThread() // Then create a new pixmap/window and new surface // If the new surface has a different display connection, then the context will be lost mAdaptorInterfaces.GetDisplayConnectionInterface().Initialize(); - newSurface->InitializeGraphics(); - newSurface->MakeContextCurrent(); + graphics.ActivateSurfaceContext(newSurface); // TODO: ReplaceGraphicsSurface doesn't work, InitializeGraphics() // already creates new surface window, the surface and the context. // We probably don't need ReplaceGraphicsSurface at all. @@ -689,8 +688,7 @@ void CombinedUpdateRenderController::UpdateRenderThread() // Get Surface Resized flag sceneSurfaceResized = scene.IsSurfaceRectChanged(); - - windowSurface->InitializeGraphics(); + windowSurface->SetIsResizing(sceneSurfaceResized); // clear previous frame damaged render items rects, buffer history is tracked on surface level mDamagedRects.clear(); @@ -706,18 +704,10 @@ void CombinedUpdateRenderController::UpdateRenderThread() // Switch to the context of the surface, merge damaged areas for previous frames windowSurface->PreRender(sceneSurfaceResized, mDamagedRects, clippingRect); // Switch GL context - if(clippingRect.IsEmpty()) - { - mDamagedRects.clear(); - } - // Render the surface mCore.RenderScene(windowRenderStatus, scene, false, clippingRect); - if(windowRenderStatus.NeedsPostRender()) - { - windowSurface->PostRender(false, false, sceneSurfaceResized, mDamagedRects); // Swap Buffer with damage - } + // Buffer swapping now happens when the surface render target is presented. // If surface is resized, the surface resized count is decreased. if(DALI_UNLIKELY(sceneSurfaceResized)) @@ -728,6 +718,11 @@ void CombinedUpdateRenderController::UpdateRenderThread() } } + if(!mUploadWithoutRendering) + { + graphics.PostRender(); + } + mCore.PostRender(mUploadWithoutRendering); //////////////////////////////