Change setting background color for Scene. 72/224072/1
authorAnton Obzhirov <a.obzhirov@samsung.com>
Fri, 10 Jan 2020 14:20:51 +0000 (14:20 +0000)
committerJoogab Yun <joogab.yun@samsung.com>
Thu, 6 Feb 2020 05:51:23 +0000 (14:51 +0900)
Sets clear color to the default render task of the scene
instead of setting background color via frame buffer property.

Fixes problem when the scene surface is replaced and the background color
information is lost when new frame buffer is created.

Change-Id: I036837f790d1db0540baf82ff9305811d05ffa51

13 files changed:
automated-tests/src/dali/dali-test-suite-utils/test-gl-abstraction.cpp
automated-tests/src/dali/dali-test-suite-utils/test-gl-abstraction.h
automated-tests/src/dali/utc-Dali-RenderTask.cpp
automated-tests/src/dali/utc-Dali-Scene.cpp
dali/internal/event/common/scene-impl.cpp
dali/internal/event/rendering/frame-buffer-impl.cpp
dali/internal/event/rendering/frame-buffer-impl.h
dali/internal/render/common/render-manager.cpp
dali/internal/render/common/render-manager.h
dali/internal/render/renderers/render-surface-frame-buffer.cpp
dali/internal/render/renderers/render-surface-frame-buffer.h
dali/internal/update/manager/update-manager.cpp
dali/internal/update/manager/update-manager.h

index 8372e03..207d9a4 100644 (file)
@@ -58,6 +58,7 @@ void TestGlAbstraction::Initialize()
 
   mLastShaderCompiled = 0;
   mLastClearBitMask = 0;
+  mLastClearColor = Color::TRANSPARENT;
   mClearCount = 0;
 
   mLastBlendEquationRgb   = 0;
@@ -131,3 +132,4 @@ bool BlendDisabled(const Dali::TraceCallStack& callStack)
   bool blendEnabled = callStack.FindMethodAndParams( "Disable", out.str() );
   return blendEnabled;
 }
+
index 3fae461..3edad10 100644 (file)
@@ -275,6 +275,15 @@ public:
 
   inline void ClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
   {
+    mLastClearColor.r = red;
+    mLastClearColor.g = green;
+    mLastClearColor.b = blue;
+    mLastClearColor.a = alpha;
+  }
+
+  inline const Vector4& GetLastClearColor() const
+  {
+    return mLastClearColor;
   }
 
   inline void ClearDepthf(GLclampf depth)
@@ -2182,6 +2191,7 @@ private:
   ShaderSourceMap mShaderSources;
   GLuint     mLastShaderCompiled;
   GLbitfield mLastClearBitMask;
+  Vector4 mLastClearColor;
   unsigned int mClearCount;
 
   Vector4 mLastBlendColor;
index 8067f58..0b86a22 100644 (file)
@@ -1641,13 +1641,13 @@ int UtcDaliRenderTaskSetClearEnabledP(void)
   RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
 
   RenderTask task = taskList.GetTask( 0u );
-  DALI_TEST_CHECK( !task.GetClearEnabled() ); // defaults to false
-
-  task.SetClearEnabled( true );
-  DALI_TEST_EQUALS( task.GetClearEnabled(), true, TEST_LOCATION );
+  DALI_TEST_CHECK( task.GetClearEnabled() ); // defaults to true
 
   task.SetClearEnabled( false );
   DALI_TEST_EQUALS( task.GetClearEnabled(), false, TEST_LOCATION );
+
+  task.SetClearEnabled( true );
+  DALI_TEST_EQUALS( task.GetClearEnabled(), true, TEST_LOCATION );
   END_TEST;
 }
 
@@ -1679,7 +1679,7 @@ int UtcDaliRenderTaskGetClearEnabledP(void)
   RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
 
   RenderTask task = taskList.GetTask( 0u );
-  DALI_TEST_CHECK( !task.GetClearEnabled() ); // defaults to false
+  DALI_TEST_CHECK( task.GetClearEnabled() ); // defaults to true
   END_TEST;
 }
 
index 11d55a6..ff1c6d7 100644 (file)
@@ -922,25 +922,47 @@ int UtcDaliSceneEnsureEmptySceneCleared(void)
 
   TestApplication application;
 
-  // Create a new scene and set the background colors of both the new and the main scenes
-  auto defaultScene = application.GetScene();
-  defaultScene.SetBackgroundColor( Color::WHITE );
+  auto& glAbstraction = application.GetGlAbstraction();
+  auto clearCountBefore = glAbstraction.GetClearCountCalled();
 
-  TestRenderSurface surface( PositionSize( 0.0f, 0.0f, 480.0f, 800.0f ) );
-  auto newScene = Integration::Scene::New( surface );
-  newScene.SetBackgroundColor( Color::RED );
+  application.SendNotification();
+  application.Render();
+
+  // No actor, no rendering at all
+  DALI_TEST_EQUALS( glAbstraction.GetClearCountCalled(), clearCountBefore, TEST_LOCATION );
+  DALI_TEST_EQUALS( glAbstraction.GetLastClearColor(), Color::TRANSPARENT, TEST_LOCATION );
 
   // Need to create a renderable as we don't start rendering until we have at least one
   // We don't need to add this to any scene
   auto actor = CreateRenderableActor();
 
-  auto& glAbstraction = application.GetGlAbstraction();
-  auto clearCountBefore = glAbstraction.GetClearCountCalled();
+  application.SendNotification();
+  application.Render();
+
+  // Default background color
+  DALI_TEST_EQUALS( glAbstraction.GetClearCountCalled(), clearCountBefore + 1, TEST_LOCATION );
+  DALI_TEST_EQUALS( glAbstraction.GetLastClearColor(), Color::BLACK, TEST_LOCATION );
+
+  // Create a new scene and set the background colors of both the new and the main scenes
+  auto defaultScene = application.GetScene();
+  defaultScene.SetBackgroundColor( Color::WHITE );
 
   application.SendNotification();
   application.Render();
 
   DALI_TEST_EQUALS( glAbstraction.GetClearCountCalled(), clearCountBefore + 2, TEST_LOCATION );
+  DALI_TEST_EQUALS( glAbstraction.GetLastClearColor(), Color::WHITE, TEST_LOCATION );
+
+  TestRenderSurface surface( PositionSize( 0.0f, 0.0f, 480.0f, 800.0f ) );
+  auto newScene = Integration::Scene::New( surface );
+  newScene.SetBackgroundColor( Color::RED );
+
+  application.SendNotification();
+  application.Render();
+
+  // + 2 clear for 2 scenes
+  DALI_TEST_EQUALS( glAbstraction.GetClearCountCalled(), clearCountBefore + 4, TEST_LOCATION );
+  DALI_TEST_EQUALS( glAbstraction.GetLastClearColor(), Color::RED, TEST_LOCATION );
 
   // Add the actor to the main scene
   defaultScene.Add( actor );
@@ -948,18 +970,21 @@ int UtcDaliSceneEnsureEmptySceneCleared(void)
   application.SendNotification();
   application.Render();
 
-  // Add another scene and set its background color, ensure we clear it to the appropriate color
+  // + 2 clear for 2 scenes
+  DALI_TEST_EQUALS( glAbstraction.GetClearCountCalled(), clearCountBefore + 6, TEST_LOCATION );
+  DALI_TEST_EQUALS( glAbstraction.GetLastClearColor(), Color::RED, TEST_LOCATION );
 
+  // Add another scene and set its background color, ensure we clear it to the appropriate color
+  // + 3 clear for 3 scenes
   TestRenderSurface surface2( PositionSize( 0.0f, 0.0f, 480.0f, 800.0f ) );
   auto thirdScene = Integration::Scene::New( surface2 );
   thirdScene.SetBackgroundColor( Color::BLUE );
 
-  clearCountBefore = glAbstraction.GetClearCountCalled();
-
   application.SendNotification();
   application.Render();
 
-  DALI_TEST_EQUALS( glAbstraction.GetClearCountCalled(), clearCountBefore + 3, TEST_LOCATION );
+  DALI_TEST_EQUALS( glAbstraction.GetClearCountCalled(), clearCountBefore + 9, TEST_LOCATION );
+  DALI_TEST_EQUALS( glAbstraction.GetLastClearColor(), Color::BLUE, TEST_LOCATION );
 
   END_TEST;
 }
@@ -1232,3 +1257,64 @@ int UtcDaliSceneKeyEventGeneratedSignalP(void)
   DALI_TEST_CHECK( event4.state == static_cast<Integration::KeyEvent::State>( data.receivedKeyEvent.state ) );
   END_TEST;
 }
+
+int UtcDaliSceneEnsureReplacedSurfaceKeepsClearColor(void)
+{
+  tet_infoline( "Ensure we keep background color when the scene surface is replaced " );
+
+  TestApplication application;
+
+  // Create a new scene and set the background color of the main scene
+  auto defaultScene = application.GetScene();
+  defaultScene.SetBackgroundColor( Color::BLUE );
+
+  // Need to create a renderable as we don't start rendering until we have at least one
+  // We don't need to add this to any scene
+  auto actor = CreateRenderableActor();
+
+  auto& glAbstraction = application.GetGlAbstraction();
+  auto clearCountBefore = glAbstraction.GetClearCountCalled();
+
+  application.SendNotification();
+  application.Render();
+
+  DALI_TEST_EQUALS( glAbstraction.GetClearCountCalled(), clearCountBefore + 1, TEST_LOCATION );
+  DALI_TEST_EQUALS( glAbstraction.GetLastClearColor(), Color::BLUE, TEST_LOCATION );
+
+  TestRenderSurface surface( PositionSize( 0.0f, 0.0f, 480.0f, 800.0f ) );
+  defaultScene.SetSurface( surface );
+
+  application.SendNotification();
+  application.Render();
+
+  DALI_TEST_EQUALS( glAbstraction.GetClearCountCalled(), clearCountBefore + 2, TEST_LOCATION );
+  DALI_TEST_EQUALS( glAbstraction.GetLastClearColor(), Color::BLUE, TEST_LOCATION );
+
+  // Check when the main render task viewport is set the clear color is clipped using scissors
+  TraceCallStack& scissorTrace = glAbstraction.GetScissorTrace();
+  TraceCallStack& enabledDisableTrace = glAbstraction.GetEnableDisableTrace();
+  scissorTrace.Enable( true );
+  enabledDisableTrace.Enable( true );
+
+  defaultScene.GetRenderTaskList().GetTask( 0 ).SetViewport( Viewport( 0.0f, 0.0f, 100.0f, 100.0f ) );
+
+  application.SendNotification();
+  application.Render();
+
+  // Check scissor test was enabled.
+  DALI_TEST_CHECK( enabledDisableTrace.FindMethodAndParams( "Enable", "3089" ) ); // 3089 = 0xC11 (GL_SCISSOR_TEST)
+
+  // Check the scissor was set, and the coordinates are correct.
+  DALI_TEST_CHECK( scissorTrace.FindMethodAndParams( "Scissor", "0, 700, 100, 100" ) );
+
+  DALI_TEST_EQUALS( glAbstraction.GetClearCountCalled(), clearCountBefore + 3, TEST_LOCATION );
+  DALI_TEST_EQUALS( glAbstraction.GetLastClearColor(), Color::BLUE, TEST_LOCATION );
+
+  scissorTrace.Enable( false );
+  scissorTrace.Reset();
+
+  enabledDisableTrace.Enable( false );
+  enabledDisableTrace.Reset();
+
+  END_TEST;
+}
index 82f5196..cb04d10 100755 (executable)
@@ -314,7 +314,8 @@ void Scene::SetBackgroundColor( const Vector4& color )
 
   if( mSurface )
   {
-    mRenderTaskList->GetTask( 0u )->GetFrameBuffer()->SetBackgroundColor( color );
+    mRenderTaskList->GetTask( 0u )->SetClearColor( color );
+    mRenderTaskList->GetTask( 0u )->SetClearEnabled( true );
   }
 }
 
index fe94b5b..fe9d368 100755 (executable)
@@ -117,14 +117,6 @@ void FrameBuffer::SetSize( uint32_t width, uint32_t height )
   }
 }
 
-void FrameBuffer::SetBackgroundColor( const Vector4& color )
-{
-  if( mRenderObject->IsSurfaceBacked() )
-  {
-    SetFrameBufferBackgroundColorMessage( mEventThreadServices.GetUpdateManager(), static_cast<Render::SurfaceFrameBuffer*>( mRenderObject ), color );
-  }
-}
-
 void FrameBuffer::MarkSurfaceAsInvalid()
 {
   if ( mIsSurfaceBacked )
index 7428ad1..fb59943 100755 (executable)
@@ -99,12 +99,6 @@ public:
   void SetSize( uint32_t width, uint32_t height );
 
   /**
-   * @brief Sets the background color
-   * @param[in] color The new background color
-   */
-  void SetBackgroundColor( const Vector4& color );
-
-  /**
    * @brief Mark the render surface as invalid
    *
    * The render surface is maked as invalid when it is deleted.
index c539eb1..adddfa2 100755 (executable)
@@ -112,7 +112,6 @@ struct RenderManager::Impl
     renderQueue(),
     instructions(),
     renderAlgorithms(),
-    backgroundColor( Dali::Stage::DEFAULT_BACKGROUND_COLOR ),
     frameCount( 0u ),
     renderBufferIndex( SceneGraphBuffers::INITIAL_UPDATE_BUFFER_INDEX ),
     defaultSurfaceRect(),
@@ -182,8 +181,6 @@ struct RenderManager::Impl
   RenderInstructionContainer                instructions;
   Render::RenderAlgorithms                  renderAlgorithms;        ///< The RenderAlgorithms object is used to action the renders required by a RenderInstruction
 
-  Vector4                                   backgroundColor;         ///< The glClear color used at the beginning of each frame.
-
   uint32_t                                  frameCount;              ///< The current frame count
   BufferIndex                               renderBufferIndex;       ///< The index of the buffer to read from; this is opposite of the "update" buffer
 
@@ -288,11 +285,6 @@ RenderInstructionContainer& RenderManager::GetRenderInstructionContainer()
   return mImpl->instructions;
 }
 
-void RenderManager::SetBackgroundColor( const Vector4& color )
-{
-  mImpl->backgroundColor = color;
-}
-
 void RenderManager::SetDefaultSurfaceRect(const Rect<int32_t>& rect)
 {
   mImpl->defaultSurfaceRect = rect;
@@ -727,7 +719,6 @@ void RenderManager::DoRender( RenderInstruction& instruction )
 
   Rect<int32_t> surfaceRect = mImpl->defaultSurfaceRect;
   int surfaceOrientation = mImpl->defaultSurfaceOrientation;
-  Vector4 backgroundColor = mImpl->backgroundColor;
   Integration::DepthBufferAvailable depthBufferAvailable = mImpl->depthBufferAvailable;
   Integration::StencilBufferAvailable stencilBufferAvailable = mImpl->stencilBufferAvailable;
   Integration::PartialUpdateAvailable partialUpdateAvailable = mImpl->partialUpdateAvailable;
@@ -760,7 +751,6 @@ void RenderManager::DoRender( RenderInstruction& instruction )
       }
 
       surfaceRect = Rect<int32_t>( 0, 0, static_cast<int32_t>( surfaceFrameBuffer->GetWidth() ), static_cast<int32_t>( surfaceFrameBuffer->GetHeight() ) );
-      backgroundColor = surfaceFrameBuffer->GetBackgroundColor();
     }
     else
     {
@@ -828,32 +818,16 @@ void RenderManager::DoRender( RenderInstruction& instruction )
 
   if ( surfaceFrameBuffer )
   {
-      mImpl->currentContext->Viewport( surfaceRect.x,
-                                surfaceRect.y,
-                                surfaceRect.width,
-                                surfaceRect.height );
-
-
-      mImpl->currentContext->ClearColor( backgroundColor.r,
-                                  backgroundColor.g,
-                                  backgroundColor.b,
-                                  backgroundColor.a );
+    mImpl->currentContext->Viewport( surfaceRect.x,
+                              surfaceRect.y,
+                              surfaceRect.width,
+                              surfaceRect.height );
   }
 
   // Clear the entire color, depth and stencil buffers for the default framebuffer, if required.
   // It is important to clear all 3 buffers when they are being used, for performance on deferred renderers
   // e.g. previously when the depth & stencil buffers were NOT cleared, it caused the DDK to exceed a "vertex count limit",
   // and then stall. That problem is only noticeable when rendering a large number of vertices per frame.
-  if( isPartialUpdate )
-  {
-    mImpl->currentContext->SetScissorTest( true );
-    mImpl->currentContext->Scissor( scissorBox.x, scissorBox.y, scissorBox.width, scissorBox.height );
-  }
-  else
-  {
-    mImpl->currentContext->SetScissorTest( false );
-  }
-
   GLbitfield clearMask = GL_COLOR_BUFFER_BIT;
 
   mImpl->currentContext->ColorMask( true );
@@ -871,14 +845,6 @@ void RenderManager::DoRender( RenderInstruction& instruction )
     clearMask |= GL_STENCIL_BUFFER_BIT;
   }
 
-  mImpl->currentContext->Clear( clearMask, Context::FORCE_CLEAR );
-
-  if( isPartialUpdate )
-  {
-    mImpl->currentContext->SetScissorTest( false );
-  }
-
-
   if( !instruction.mIgnoreRenderToFbo && ( instruction.mFrameBuffer != 0 ) )
   {
     if ( instruction.mFrameBuffer->IsSurfaceBacked() ) // Surface rendering
@@ -932,6 +898,17 @@ void RenderManager::DoRender( RenderInstruction& instruction )
     }
   }
 
+  bool clearFullFrameRect = true;
+  if( instruction.mFrameBuffer != 0 )
+  {
+    Viewport frameRect( 0, 0, instruction.mFrameBuffer->GetWidth(), instruction.mFrameBuffer->GetHeight() );
+    clearFullFrameRect = ( frameRect == viewportRect );
+  }
+  else
+  {
+    clearFullFrameRect = ( surfaceRect == viewportRect );
+  }
+
   if ( surfaceOrientation == 90 || surfaceOrientation == 270 )
   {
     int temp = viewportRect.width;
@@ -940,15 +917,13 @@ void RenderManager::DoRender( RenderInstruction& instruction )
   }
 
   mImpl->currentContext->Viewport(viewportRect.x, viewportRect.y, viewportRect.width, viewportRect.height);
+  mImpl->currentContext->ClearColor( clearColor.r,
+                                     clearColor.g,
+                                     clearColor.b,
+                                     clearColor.a );
 
-  if ( instruction.mIsClearColorSet )
+  if( instruction.mIsClearColorSet && !clearFullFrameRect )
   {
-    mImpl->currentContext->ClearColor( clearColor.r,
-                                       clearColor.g,
-                                       clearColor.b,
-                                       clearColor.a );
-
-    // Clear the viewport area only
     mImpl->currentContext->SetScissorTest( true );
     if( isPartialUpdate )
     {
@@ -959,9 +934,13 @@ void RenderManager::DoRender( RenderInstruction& instruction )
     {
       mImpl->currentContext->Scissor( viewportRect.x, viewportRect.y, viewportRect.width, viewportRect.height );
     }
-    mImpl->currentContext->ColorMask( true );
-    mImpl->currentContext->Clear( GL_COLOR_BUFFER_BIT , Context::CHECK_CACHED_VALUES );
+    mImpl->currentContext->Clear( clearMask, Context::FORCE_CLEAR );
+    mImpl->currentContext->SetScissorTest( false );
+  }
+  else
+  {
     mImpl->currentContext->SetScissorTest( false );
+    mImpl->currentContext->Clear( clearMask, Context::FORCE_CLEAR );
   }
 
   // Clear the list of bound textures
@@ -1063,4 +1042,4 @@ void RenderManager::DoRender( RenderInstruction& instruction )
 
 } // namespace Internal
 
-} // namespace Dali
+} // namespace Dali
\ No newline at end of file
index 16aac97..a5ad160 100755 (executable)
@@ -123,12 +123,6 @@ public:
 
   // The following methods should be called via RenderQueue messages
 
-  /**
-   * Set the background color i.e. the glClear color used at the beginning of each frame.
-   * @param[in] color The new background color.
-   */
-  void SetBackgroundColor( const Vector4& color );
-
   /*
    * Set the frame time delta (time elapsed since the last frame.
    * @param[in] deltaTime the delta time
index 05248ce..ee8c49c 100755 (executable)
@@ -33,9 +33,7 @@ SurfaceFrameBuffer::SurfaceFrameBuffer( Integration::RenderSurface* surface )
   mContext( nullptr ),
   mWidth( mSurface->GetPositionSize().width ),
   mHeight( mSurface->GetPositionSize().height ),
-  mBackgroundColor( 0.f, 0.f, 0.f, 1.f ),
   mSizeChanged( false ),
-  mBackgroundColorChanged( false ),
   mIsSurfaceInvalid( false ),
   mPartialUpdateEnabled( true )
 {
@@ -106,7 +104,6 @@ void SurfaceFrameBuffer::PostRender()
   }
 
   mSizeChanged = false;
-  mBackgroundColorChanged = false;
   mPartialUpdateEnabled = true;
 }
 
@@ -131,11 +128,6 @@ void SurfaceFrameBuffer::MakeContextCurrent()
   }
 }
 
-Vector4 SurfaceFrameBuffer::GetBackgroundColor()
-{
-  return mBackgroundColor;
-}
-
 void SurfaceFrameBuffer::SetSize( uint32_t width, uint32_t height )
 {
   mWidth = width;
@@ -143,12 +135,6 @@ void SurfaceFrameBuffer::SetSize( uint32_t width, uint32_t height )
   mSizeChanged = true;
 }
 
-void SurfaceFrameBuffer::SetBackgroundColor( const Vector4& color )
-{
-  mBackgroundColor = color;
-  mBackgroundColorChanged = true;
-}
-
 bool SurfaceFrameBuffer::IsSurfaceValid() const
 {
   return mSurface && !mIsSurfaceInvalid;
@@ -159,7 +145,7 @@ bool SurfaceFrameBuffer::IsPartialUpdateEnabled() const
   bool ret = false;
   if ( IsSurfaceValid() )
   {
-    ret = mSurface->GetBufferAge() && ( mPartialUpdateEnabled && !( mSizeChanged || mBackgroundColorChanged ) );
+    ret = mSurface->GetBufferAge() && ( mPartialUpdateEnabled && !mSizeChanged );
   }
   return ret;
 }
index 6749e87..f295c45 100755 (executable)
@@ -94,12 +94,6 @@ public:
   void SetSize( uint32_t width, uint32_t height );
 
   /**
-   * @brief Sets the background color.
-   * @param[in] color The new background color
-   */
-  void SetBackgroundColor( const Vector4& color );
-
-  /**
    * @copydoc Dali::Internal::FrameBuffer::MarkSurfaceAsInvalid()
    */
   void MarkSurfaceAsInvalid() { mIsSurfaceInvalid = true; };
@@ -130,12 +124,6 @@ public:
   void MakeContextCurrent();
 
   /**
-   * @brief Gets the background color of the surface.
-   * @return The background color
-   */
-  Vector4 GetBackgroundColor();
-
-  /**
    * @brief Sets currentframe damaged rects
    * @param[in] Sets currentframe damaged rects
    * @param[out] return merged rect
@@ -161,9 +149,7 @@ private:
 
   uint32_t                    mWidth;
   uint32_t                    mHeight;
-  Vector4                     mBackgroundColor;
   bool                        mSizeChanged;
-  bool                        mBackgroundColorChanged;
   std::atomic<bool>           mIsSurfaceInvalid; ///< This is set only from the event thread and read only from the render thread
   bool                        mPartialUpdateEnabled; ///< This value is whether partial update is required
 };
@@ -180,17 +166,6 @@ inline void SetFrameBufferSizeMessage( SceneGraph::UpdateManager& updateManager,
   new (slot) LocalType( surfaceFrameBuffer, &SurfaceFrameBuffer::SetSize, width, height );
 }
 
-inline void SetFrameBufferBackgroundColorMessage( SceneGraph::UpdateManager& updateManager, SurfaceFrameBuffer* surfaceFrameBuffer, const Vector4& color )
-{
-  typedef MessageValue1< SurfaceFrameBuffer, Vector4 > LocalType;
-
-  // Reserve some memory inside the message queue
-  uint32_t* slot = updateManager.ReserveMessageSlot( sizeof( LocalType ) );
-
-  // Construct message in the message queue memory; note that delete should not be called on the return value
-  new (slot) LocalType( surfaceFrameBuffer, &SurfaceFrameBuffer::SetBackgroundColor, color );
-}
-
 inline void SetFrameBufferPartialUpdateMessage( SceneGraph::UpdateManager& updateManager, SurfaceFrameBuffer* surfaceFrameBuffer, bool value )
 {
   typedef MessageValue1< SurfaceFrameBuffer, bool > LocalType;
index 6780aee..baa2cd1 100755 (executable)
@@ -1090,17 +1090,6 @@ uint32_t UpdateManager::KeepUpdatingCheck( float elapsedSeconds ) const
   return keepUpdatingRequest;
 }
 
-void UpdateManager::SetBackgroundColor( const Vector4& color )
-{
-  typedef MessageValue1< RenderManager, Vector4 > DerivedType;
-
-  // Reserve some memory inside the render queue
-  uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) );
-
-  // Construct message in the render queue memory; note that delete should not be called on the return value
-  new (slot) DerivedType( &mImpl->renderManager, &RenderManager::SetBackgroundColor, color );
-}
-
 void UpdateManager::SetDefaultSurfaceRect( const Rect<int32_t>& rect )
 {
   mImpl->surfaceRectChanged = true;
index 58d1e66..72df33c 100755 (executable)
@@ -596,12 +596,6 @@ public:
                    bool isRenderingToFbo );
 
   /**
-   * Set the background color i.e. the glClear color used at the beginning of each frame.
-   * @param[in] color The new background color.
-   */
-  void SetBackgroundColor(const Vector4& color);
-
-  /**
    * Set the default surface rect.
    * @param[in] rect The rect value representing the surface.
    */
@@ -1016,17 +1010,6 @@ inline void SetShaderProgramMessage( UpdateManager& manager,
   new (slot) LocalType( &manager, &UpdateManager::SetShaderProgram, const_cast<Shader*>( &shader ), shaderData, modifiesGeometry );
 }
 
-inline void SetBackgroundColorMessage( UpdateManager& manager, const Vector4& color )
-{
-  typedef MessageValue1< UpdateManager, Vector4 > LocalType;
-
-  // Reserve some memory inside the message queue
-  uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
-
-  // Construct message in the message queue memory; note that delete should not be called on the return value
-  new (slot) LocalType( &manager, &UpdateManager::SetBackgroundColor, color );
-}
-
 inline void SetDefaultSurfaceRectMessage( UpdateManager& manager, const Rect<int32_t>& rect  )
 {
   typedef MessageValue1< UpdateManager, Rect<int32_t> > LocalType;