From eb0e209b0f8d9bc4d1fcab55e953992656f149ca Mon Sep 17 00:00:00 2001 From: Heeyong Song Date: Tue, 25 Jun 2019 13:41:22 +0900 Subject: [PATCH] Revert "[Tizen] SceneHolder sets background color through the Scene to send an information to the UpdateRender thread" This reverts commit 049b20d393f0ee225eb77129b94fd32dc6c539b9. Change-Id: I861b7f823e6b37ecd8be1a6f1df7d8734fe96907 --- dali/integration-api/render-surface-interface.h | 21 ++++++++++++++++++++- dali/integration-api/scene-holder-impl.cpp | 6 +++--- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/dali/integration-api/render-surface-interface.h b/dali/integration-api/render-surface-interface.h index 501bf62..ad672ca 100644 --- a/dali/integration-api/render-surface-interface.h +++ b/dali/integration-api/render-surface-interface.h @@ -66,7 +66,8 @@ public: mGraphics( nullptr ), mDisplayConnection( nullptr ), mDepthBufferRequired( Integration::DepthBufferAvailable::FALSE ), - mStencilBufferRequired( Integration::StencilBufferAvailable::FALSE ) + mStencilBufferRequired( Integration::StencilBufferAvailable::FALSE ), + mBackgroundColor() {} /** @@ -175,6 +176,24 @@ public: */ virtual Integration::StencilBufferAvailable GetStencilBufferRequired() = 0; + /** + * @brief Sets the background color of the surface. + * @param[in] color The new background color + */ + virtual void SetBackgroundColor( Vector4 color ) override + { + mBackgroundColor = color; + } + + /** + * @brief Gets the background color of the surface. + * @return The background color + */ + virtual Vector4 GetBackgroundColor() override + { + return mBackgroundColor; + } + public: void SetAdaptor( Dali::Internal::Adaptor::AdaptorInternalServices& adaptor ) diff --git a/dali/integration-api/scene-holder-impl.cpp b/dali/integration-api/scene-holder-impl.cpp index dd69de9..efbbd60 100644 --- a/dali/integration-api/scene-holder-impl.cpp +++ b/dali/integration-api/scene-holder-impl.cpp @@ -200,15 +200,15 @@ Dali::RenderSurfaceInterface* SceneHolder::GetSurface() const void SceneHolder::SetBackgroundColor( const Vector4& color ) { - if( mScene ) + if ( mSurface ) { - mScene.SetBackgroundColor( color ); + mSurface->SetBackgroundColor( color ); } } Vector4 SceneHolder::GetBackgroundColor() const { - return mScene ? mScene.GetBackgroundColor() : Vector4(); + return mSurface ? mSurface->GetBackgroundColor() : Vector4(); } void SceneHolder::SetAdaptor(Dali::Adaptor& adaptor) -- 2.7.4