diff Framework/Viewport/SdlViewport.cpp @ 1211:d10d2acb8a02 broker

compositors do not keep a reference to the scene anymore
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 04 Dec 2019 16:47:21 +0100
parents 6009c59d8676
children 86a8266b8888
line wrap: on
line diff
--- a/Framework/Viewport/SdlViewport.cpp	Wed Dec 04 16:13:10 2019 +0100
+++ b/Framework/Viewport/SdlViewport.cpp	Wed Dec 04 16:47:21 2019 +0100
@@ -50,7 +50,7 @@
                                        bool allowDpiScaling) :
     context_(title, width, height, allowDpiScaling)
   {
-    compositor_.reset(new OpenGLCompositor(context_, GetScene()));
+    compositor_.reset(new OpenGLCompositor(context_));
   }
 
   void SdlOpenGLViewport::Invalidate()
@@ -61,7 +61,7 @@
   void SdlOpenGLViewport::Paint()
   {
     boost::mutex::scoped_lock lock(mutex_);
-    compositor_->Refresh();
+    compositor_->Refresh(GetScene());
   }
 
 
@@ -70,7 +70,7 @@
                                      unsigned int height,
                                      bool allowDpiScaling) :
     window_(title, width, height, false /* enable OpenGL */, allowDpiScaling),
-    compositor_(GetScene(), width, height),
+    compositor_(width, height),
     sdlSurface_(NULL)
   {
   }
@@ -85,7 +85,7 @@
   
   void SdlCairoViewport::InvalidateInternal()  // Assumes that the mutex is locked
   {
-    compositor_.Refresh();
+    compositor_.Refresh(GetScene());
     CreateSdlSurfaceFromCompositor();
   }