From c12c1126016b3e49cf1237064f4b7ce5c302e0e4 Mon Sep 17 00:00:00 2001 From: Richard Huang Date: Thu, 5 Mar 2020 11:29:56 +0000 Subject: [PATCH] Remove RenderSurface from Core Change-Id: I72bedac632bd85543e7518617b895085f9a283cf --- .../src/dali-adaptor-internal/CMakeLists.txt | 1 - automated-tests/src/dali-adaptor/CMakeLists.txt | 1 - .../dali-test-suite-utils/test-application.cpp | 18 ++- .../dali-test-suite-utils/test-application.h | 2 - .../test-gl-context-helper-abstraction.h | 8 +- .../dali-test-suite-utils/test-render-surface.cpp | 115 --------------- .../dali-test-suite-utils/test-render-surface.h | 155 --------------------- .../src/dali-platform-abstraction/CMakeLists.txt | 1 - build/tizen/linker-test.cpp | 3 +- dali/integration-api/adaptor-framework/adaptor.h | 9 +- .../adaptor-framework/render-surface-interface.h | 21 ++- .../adaptor-framework/scene-holder-impl.cpp | 14 +- dali/internal/adaptor/common/adaptor-impl.cpp | 15 +- dali/internal/adaptor/common/adaptor-impl.h | 11 +- .../adaptor/common/adaptor-internal-services.h | 11 +- dali/internal/adaptor/common/adaptor.cpp | 9 +- dali/internal/adaptor/common/application-impl.cpp | 8 +- .../common/combined-update-render-controller.cpp | 94 +++++-------- .../common/combined-update-render-controller.h | 25 +--- .../adaptor/common/thread-controller-interface.h | 6 - .../gles/egl-context-helper-implementation.cpp | 10 +- .../gles/egl-context-helper-implementation.h | 7 +- .../android/native-image-source-impl-android.cpp | 4 +- .../tizen/native-image-source-impl-tizen.cpp | 4 +- .../ubuntu-x11/native-image-source-impl-x.cpp | 5 +- .../windows/native-image-source-impl-win.cpp | 4 +- dali/internal/system/common/thread-controller.cpp | 5 - dali/internal/system/common/thread-controller.h | 6 - .../android/display-connection-impl-android.cpp | 6 +- .../android/display-connection-impl-android.h | 6 +- .../window-system/common/display-connection-impl.h | 4 +- .../window-system/common/display-connection.cpp | 4 +- .../window-system/common/display-connection.h | 6 +- .../window-system/common/pixmap-render-surface.h | 6 +- .../window-system/common/render-surface-factory.h | 4 +- .../window-system/common/window-render-surface.cpp | 6 +- .../window-system/common/window-render-surface.h | 38 ++--- .../display-connection-impl-ecore-wl.cpp | 10 +- .../display-connection-impl-ecore-wl.h | 6 +- .../native-render-surface-ecore-wl.cpp | 6 +- .../tizen-wayland/native-render-surface-ecore-wl.h | 40 +++--- .../ubuntu-x11/display-connection-impl-x.cpp | 6 +- .../ubuntu-x11/display-connection-impl-x.h | 4 +- .../ubuntu-x11/pixmap-render-surface-ecore-x.cpp | 6 +- .../ubuntu-x11/pixmap-render-surface-ecore-x.h | 36 ++--- .../windows/display-connection-impl-win.cpp | 6 +- .../windows/display-connection-impl-win.h | 4 +- 47 files changed, 211 insertions(+), 565 deletions(-) delete mode 100644 automated-tests/src/dali-adaptor/dali-test-suite-utils/test-render-surface.cpp delete mode 100644 automated-tests/src/dali-adaptor/dali-test-suite-utils/test-render-surface.h diff --git a/automated-tests/src/dali-adaptor-internal/CMakeLists.txt b/automated-tests/src/dali-adaptor-internal/CMakeLists.txt index 7df3c8c..4b0039e 100644 --- a/automated-tests/src/dali-adaptor-internal/CMakeLists.txt +++ b/automated-tests/src/dali-adaptor-internal/CMakeLists.txt @@ -30,7 +30,6 @@ LIST(APPEND TC_SOURCES ../dali-adaptor/dali-test-suite-utils/test-native-image.cpp ../dali-adaptor/dali-test-suite-utils/test-platform-abstraction.cpp ../dali-adaptor/dali-test-suite-utils/test-render-controller.cpp - ../dali-adaptor/dali-test-suite-utils/test-render-surface.cpp ../dali-adaptor/dali-test-suite-utils/test-trace-call-stack.cpp ../dali-adaptor/dali-test-suite-utils/adaptor-test-adaptor-impl.cpp ) diff --git a/automated-tests/src/dali-adaptor/CMakeLists.txt b/automated-tests/src/dali-adaptor/CMakeLists.txt index 6545723..2fe5be8 100644 --- a/automated-tests/src/dali-adaptor/CMakeLists.txt +++ b/automated-tests/src/dali-adaptor/CMakeLists.txt @@ -32,7 +32,6 @@ LIST(APPEND TC_SOURCES dali-test-suite-utils/test-native-image.cpp dali-test-suite-utils/test-platform-abstraction.cpp dali-test-suite-utils/test-render-controller.cpp - dali-test-suite-utils/test-render-surface.cpp dali-test-suite-utils/test-trace-call-stack.cpp dali-test-suite-utils/adaptor-test-adaptor-impl.cpp ) diff --git a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-application.cpp b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-application.cpp index f5d670d..f85f14d 100644 --- a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-application.cpp +++ b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-application.cpp @@ -27,8 +27,7 @@ TestApplication::TestApplication( uint32_t surfaceWidth, uint32_t horizontalDpi, uint32_t verticalDpi, bool initialize ) -: mRenderSurface( NULL ), - mCore( NULL ), +: mCore( NULL ), mSurfaceWidth( surfaceWidth ), mSurfaceHeight( surfaceHeight ), mFrame( 0u ), @@ -75,8 +74,7 @@ void TestApplication::CreateCore() void TestApplication::CreateScene() { - mRenderSurface = new TestRenderSurface( Dali::PositionSize( 0, 0, mSurfaceWidth, mSurfaceHeight ) ); - mScene = Dali::Integration::Scene::New( *mRenderSurface ); + mScene = Dali::Integration::Scene::New( Size( static_cast( mSurfaceWidth ), static_cast( mSurfaceHeight ) ) ); mScene.SetDpi( Vector2( static_cast( mDpi.x ), static_cast( mDpi.y ) ) ); } @@ -89,7 +87,6 @@ void TestApplication::InitializeCore() TestApplication::~TestApplication() { Dali::Integration::Log::UninstallLogFunction(); - delete mRenderSurface; delete mCore; } @@ -190,7 +187,11 @@ void TestApplication::DoUpdate( uint32_t intervalMilliseconds, const char* locat bool TestApplication::Render( uint32_t intervalMilliseconds, const char* location ) { DoUpdate( intervalMilliseconds, location ); - mCore->Render( mRenderStatus, false /*do not force clear*/, false /*do not skip rendering*/ ); + + mCore->PreRender( mRenderStatus, false /*do not force clear*/, false /*do not skip rendering*/ ); + mCore->RenderScene( mScene, true /*render the off-screen buffers*/); + mCore->RenderScene( mScene, false /*render the surface*/); + mCore->PostRender( false /*do not skip rendering*/ ); mFrame++; @@ -216,7 +217,10 @@ bool TestApplication::GetRenderNeedsUpdate() bool TestApplication::RenderOnly( ) { // Update Time values - mCore->Render( mRenderStatus, false /*do not force clear*/, false /*do not skip rendering*/ ); + mCore->PreRender( mRenderStatus, false /*do not force clear*/, false /*do not skip rendering*/ ); + mCore->RenderScene( mScene, true /*render the off-screen buffers*/); + mCore->RenderScene( mScene, false /*render the surface*/); + mCore->PostRender( false /*do not skip rendering*/ ); mFrame++; diff --git a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-application.h b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-application.h index 2606a56..a922e23 100644 --- a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-application.h +++ b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-application.h @@ -24,7 +24,6 @@ #include "test-gl-abstraction.h" #include "test-gl-context-helper-abstraction.h" #include "test-render-controller.h" -#include "test-render-surface.h" #include #include #include @@ -95,7 +94,6 @@ protected: TestGlAbstraction mGlAbstraction; TestGlSyncAbstraction mGlSyncAbstraction; TestGlContextHelperAbstraction mGlContextHelperAbstraction; - TestRenderSurface* mRenderSurface; Integration::UpdateStatus mStatus; Integration::RenderStatus mRenderStatus; diff --git a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-gl-context-helper-abstraction.h b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-gl-context-helper-abstraction.h index 0442f0d..ce150d1 100644 --- a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-gl-context-helper-abstraction.h +++ b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-gl-context-helper-abstraction.h @@ -2,7 +2,7 @@ #define TEST_GL_CONTEXT_HELPER_ABSTRACTION_H /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -46,12 +46,6 @@ public: virtual void MakeSurfacelessContextCurrent() {}; /** - * @brief Switch to the GL context of the specific render surface - * @param[in] surface The render surface - */ - virtual void MakeContextCurrent( Integration::RenderSurface* surface ) {}; - - /** * @brief Clear the GL context */ virtual void MakeContextNull() {}; diff --git a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-render-surface.cpp b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-render-surface.cpp deleted file mode 100644 index 332d77e..0000000 --- a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-render-surface.cpp +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#include "test-render-surface.h" - -namespace Dali -{ - -TestRenderSurface::TestRenderSurface( Dali::PositionSize positionSize ) -: mPositionSize( positionSize ), - mBackgroundColor() -{ -} - -TestRenderSurface::~TestRenderSurface() -{ -} - -Dali::PositionSize TestRenderSurface::GetPositionSize() const -{ - return mPositionSize; -}; - -void TestRenderSurface::GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical ) -{ - dpiHorizontal = dpiVertical = 96; -}; - -void TestRenderSurface::InitializeGraphics() -{ -} - -void TestRenderSurface::CreateSurface() -{ -} - -void TestRenderSurface::DestroySurface() -{ -} - -bool TestRenderSurface::ReplaceGraphicsSurface() -{ - return false; -} - -void TestRenderSurface::MoveResize( Dali::PositionSize positionSize ) -{ - mPositionSize = positionSize; -} - -void TestRenderSurface::StartRender() -{ -} - -bool TestRenderSurface::PreRender( bool resizingSurface ) -{ - return true; -} - -void TestRenderSurface::PostRender( bool renderToFbo, bool replacingSurface, bool resizingSurface ) -{ -} - -void TestRenderSurface::StopRender() -{ -} - -void TestRenderSurface::ReleaseLock() -{ -} - -Dali::Integration::RenderSurface::Type TestRenderSurface::GetSurfaceType() -{ - return WINDOW_RENDER_SURFACE; -} - -void TestRenderSurface::MakeContextCurrent() -{ -} - -Integration::DepthBufferAvailable TestRenderSurface::GetDepthBufferRequired() -{ - return Integration::DepthBufferAvailable::TRUE; -} - -Integration::StencilBufferAvailable TestRenderSurface::GetStencilBufferRequired() -{ - return Integration::StencilBufferAvailable::TRUE; -} - -void TestRenderSurface::SetBackgroundColor( Vector4 color ) -{ - mBackgroundColor = color; -} - -Vector4 TestRenderSurface::GetBackgroundColor() -{ - return mBackgroundColor; -} - -} // Namespace dali diff --git a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-render-surface.h b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-render-surface.h deleted file mode 100644 index fba89c2..0000000 --- a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-render-surface.h +++ /dev/null @@ -1,155 +0,0 @@ -#ifndef TEST_REENDER_SURFACE_H -#define TEST_REENDER_SURFACE_H - -/* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -// INTERNAL INCLUDES -#include -#include - -namespace Dali -{ - -/** - * Concrete implementation of the RenderSurface class. - */ -class DALI_CORE_API TestRenderSurface : public Dali::Integration::RenderSurface -{ -public: - - /** - * @copydoc Dali::Integration::RenderSurface::RenderSurface - */ - TestRenderSurface( Dali::PositionSize positionSize ); - - /** - * @copydoc Dali::Integration::RenderSurface::~RenderSurface - */ - virtual ~TestRenderSurface(); - - /** - * @copydoc Dali::Integration::RenderSurface::GetPositionSize - */ - virtual Dali::PositionSize GetPositionSize() const; - - /** - * @copydoc Dali::Integration::RenderSurface::GetDpi - */ - virtual void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical ); - - /** - * @copydoc Dali::Integration::RenderSurface::InitializeGraphics - */ - virtual void InitializeGraphics(); - - /** - * @copydoc Dali::Integration::RenderSurface::CreateSurface - */ - virtual void CreateSurface(); - - /** - * @copydoc Dali::Integration::RenderSurface::DestroySurface - */ - virtual void DestroySurface(); - - /** - * @copydoc Dali::Integration::RenderSurface::ReplaceGraphicsSurface - */ - virtual bool ReplaceGraphicsSurface(); - - /** - * @copydoc Dali::Integration::RenderSurface::MoveResize - */ - virtual void MoveResize( Dali::PositionSize positionSize ); - - /** - * @copydoc Dali::Integration::RenderSurface::StartRender - */ - virtual void StartRender(); - - /** - * @copydoc Dali::Integration::RenderSurface::PreRender - */ - virtual bool PreRender( bool resizingSurface ); - - /** - * @copydoc Dali::Integration::RenderSurface::PostRender - */ - virtual void PostRender( bool renderToFbo, bool replacingSurface, bool resizingSurface ); - - /** - * @copydoc Dali::Integration::RenderSurface::StopRender - */ - virtual void StopRender(); - - /** - * @copydoc Dali::Integration::RenderSurface::ReleaseLock - */ - virtual void ReleaseLock(); - - /** - * @copydoc Dali::Integration::RenderSurface::GetSurfaceType - */ - virtual Dali::Integration::RenderSurface::Type GetSurfaceType(); - - /** - * @copydoc Dali::Integration::RenderSurface::MakeContextCurrent - */ - virtual void MakeContextCurrent(); - - /** - * @copydoc Dali::Integration::RenderSurface::GetDepthBufferRequired - */ - virtual Integration::DepthBufferAvailable GetDepthBufferRequired(); - - /** - * @copydoc Dali::Integration::RenderSurface::GetStencilBufferRequired - */ - virtual Integration::StencilBufferAvailable GetStencilBufferRequired(); - - /** - * @copydoc Dali::Integration::RenderSurface::SetBackgroundColor - */ - virtual void SetBackgroundColor( Vector4 color ); - - /** - * @copydoc Dali::Integration::RenderSurface::GetBackgroundColor - */ - virtual Vector4 GetBackgroundColor(); - -private: - - /** - * @brief Undefined copy constructor. RenderSurface cannot be copied - */ - TestRenderSurface( const TestRenderSurface& rhs ); - - /** - * @brief Undefined assignment operator. RenderSurface cannot be copied - */ - TestRenderSurface& operator=( const TestRenderSurface& rhs ); - -private: - - Dali::PositionSize mPositionSize; - Vector4 mBackgroundColor; ///< The background color of the surface -}; - -} // Dali - -#endif diff --git a/automated-tests/src/dali-platform-abstraction/CMakeLists.txt b/automated-tests/src/dali-platform-abstraction/CMakeLists.txt index 24dc383..07fc820 100644 --- a/automated-tests/src/dali-platform-abstraction/CMakeLists.txt +++ b/automated-tests/src/dali-platform-abstraction/CMakeLists.txt @@ -20,7 +20,6 @@ LIST(APPEND TC_SOURCES ../dali-adaptor/dali-test-suite-utils/test-native-image.cpp ../dali-adaptor/dali-test-suite-utils/test-platform-abstraction.cpp ../dali-adaptor/dali-test-suite-utils/test-render-controller.cpp - ../dali-adaptor/dali-test-suite-utils/test-render-surface.cpp ../dali-adaptor/dali-test-suite-utils/test-trace-call-stack.cpp ../dali-adaptor/dali-test-suite-utils/adaptor-test-adaptor-impl.cpp tct-dali-platform-abstraction-core.cpp diff --git a/build/tizen/linker-test.cpp b/build/tizen/linker-test.cpp index 2d4a4be..90f365a 100644 --- a/build/tizen/linker-test.cpp +++ b/build/tizen/linker-test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,7 +19,6 @@ #include #include #include -#include // INTERNAL INCLUDES #include diff --git a/dali/integration-api/adaptor-framework/adaptor.h b/dali/integration-api/adaptor-framework/adaptor.h index b057389..948737d 100755 --- a/dali/integration-api/adaptor-framework/adaptor.h +++ b/dali/integration-api/adaptor-framework/adaptor.h @@ -2,7 +2,7 @@ #define DALI_INTEGRATION_ADAPTOR_H /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -290,13 +290,6 @@ public: void ReplaceSurface( Dali::Integration::SceneHolder sceneHolder, Dali::RenderSurfaceInterface& surface ); /** - * @brief Deletes the rendering surface - * - * @param[in] surface to delete - */ - void DeleteSurface( Dali::RenderSurfaceInterface& surface ); - - /** * @brief Get the render surface the adaptor is using to render to. * * @return reference to current render surface diff --git a/dali/integration-api/adaptor-framework/render-surface-interface.h b/dali/integration-api/adaptor-framework/render-surface-interface.h index f780554..25ad128 100644 --- a/dali/integration-api/adaptor-framework/render-surface-interface.h +++ b/dali/integration-api/adaptor-framework/render-surface-interface.h @@ -2,7 +2,7 @@ #define DALI_RENDER_SURFACE_INTERFACE_H /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,9 +19,10 @@ */ // EXTERNAL INCLUDES -#include #include #include +#include +#include namespace Dali { @@ -39,6 +40,11 @@ class GraphicsInterface; } /** + * @brief The position and size of the render surface. + */ +typedef Dali::Rect PositionSize; + +/** * @brief Interface for a render surface onto which Dali draws. * * Dali::Adaptor requires a render surface to draw on to. This is @@ -51,10 +57,17 @@ class GraphicsInterface; * implementation of RenderSurface for the given platform */ -class RenderSurfaceInterface : public Dali::Integration::RenderSurface +class RenderSurfaceInterface { public: + enum Type + { + WINDOW_RENDER_SURFACE, + PIXMAP_RENDER_SURFACE, + NATIVE_RENDER_SURFACE + }; + /** * @brief Constructor * Inlined as this is a pure abstract interface @@ -154,7 +167,7 @@ public: /** * @brief Gets the surface type */ - virtual Dali::Integration::RenderSurface::Type GetSurfaceType() = 0; + virtual Dali::RenderSurfaceInterface::Type GetSurfaceType() = 0; /** * @brief Makes the graphics context current diff --git a/dali/integration-api/adaptor-framework/scene-holder-impl.cpp b/dali/integration-api/adaptor-framework/scene-holder-impl.cpp index 1a213a2..17b916e 100644 --- a/dali/integration-api/adaptor-framework/scene-holder-impl.cpp +++ b/dali/integration-api/adaptor-framework/scene-holder-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -132,8 +132,6 @@ SceneHolder::~SceneHolder() mAdaptor->RemoveObserver( *mLifeCycleObserver.get() ); mAdaptor->RemoveWindow( this ); - mAdaptor->DeleteSurface( *mSurface.get() ); - mAdaptor = nullptr; } @@ -188,7 +186,9 @@ void SceneHolder::SetSurface(Dali::RenderSurfaceInterface* surface) { mSurface.reset( surface ); - mScene.SetSurface( *mSurface.get() ); + mScene.SurfaceReplaced(); + + SurfaceResized(); unsigned int dpiHorizontal, dpiVertical; dpiHorizontal = dpiVertical = 0; @@ -203,7 +203,8 @@ void SceneHolder::SetSurface(Dali::RenderSurfaceInterface* surface) void SceneHolder::SurfaceResized() { - mScene.SurfaceResized(); + PositionSize surfacePositionSize = mSurface->GetPositionSize(); + mScene.SurfaceResized( static_cast( surfacePositionSize.width ), static_cast( surfacePositionSize.height ) ); } Dali::RenderSurfaceInterface* SceneHolder::GetSurface() const @@ -235,7 +236,8 @@ void SceneHolder::SetAdaptor(Dali::Adaptor& adaptor) mAdaptorStarted = true; // Create the scene - mScene = Dali::Integration::Scene::New( *mSurface ); + PositionSize surfacePositionSize = mSurface->GetPositionSize(); + mScene = Dali::Integration::Scene::New( Size(static_cast( surfacePositionSize.width ), static_cast( surfacePositionSize.height )) ); Internal::Adaptor::Adaptor& adaptorImpl = Internal::Adaptor::Adaptor::GetImplementation( adaptor ); mAdaptor = &adaptorImpl; diff --git a/dali/internal/adaptor/common/adaptor-impl.cpp b/dali/internal/adaptor/common/adaptor-impl.cpp index d2bee02..cbf467f 100755 --- a/dali/internal/adaptor/common/adaptor-impl.cpp +++ b/dali/internal/adaptor/common/adaptor-impl.cpp @@ -555,16 +555,6 @@ void Adaptor::ReplaceSurface( Dali::Integration::SceneHolder window, Dali::Rende } } -void Adaptor::DeleteSurface( Dali::RenderSurfaceInterface& surface ) -{ - // Flush the event queue to give the update-render thread chance - // to start processing messages for new camera setup etc as soon as possible - ProcessCoreEvents(); - - // This method blocks until the render thread has finished rendering the current surface. - mThreadController->DeleteSurface( &surface ); -} - Dali::RenderSurfaceInterface& Adaptor::GetSurface() const { return *mWindows.front()->GetSurface(); @@ -753,6 +743,11 @@ Integration::PlatformAbstraction& Adaptor::GetPlatformAbstraction() const return *mPlatformAbstraction; } +void Adaptor::GetWindowContainerInterface( WindowContainer& windows ) +{ + windows = mWindows; +} + void Adaptor::DestroyTtsPlayer(Dali::TtsPlayer::Mode mode) { if( mTtsPlayers[mode] ) diff --git a/dali/internal/adaptor/common/adaptor-impl.h b/dali/internal/adaptor/common/adaptor-impl.h index e413529..2186a15 100755 --- a/dali/internal/adaptor/common/adaptor-impl.h +++ b/dali/internal/adaptor/common/adaptor-impl.h @@ -287,12 +287,6 @@ public: // AdaptorInternalServices implementation bool RemoveWindow( Dali::Internal::Adaptor::SceneHolder* childWindow ); /** - * @brief Deletes the rendering surface - * @param[in] surface to delete - */ - void DeleteSurface( Dali::RenderSurfaceInterface& surface ); - - /** * @brief Retrieve the window that the given actor is added to. * * @param[in] actor The actor @@ -491,6 +485,11 @@ public: //AdaptorInternalServices */ virtual TraceInterface& GetSystemTraceInterface(); + /** + * copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetWindowContainerInterface() + */ + virtual void GetWindowContainerInterface( WindowContainer& windows ); + public: // Signals /** diff --git a/dali/internal/adaptor/common/adaptor-internal-services.h b/dali/internal/adaptor/common/adaptor-internal-services.h index 4769f4b..ab88729 100644 --- a/dali/internal/adaptor/common/adaptor-internal-services.h +++ b/dali/internal/adaptor/common/adaptor-internal-services.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_ADAPTOR_INTERNAL_SERVICES_H /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,7 +23,6 @@ #include // INTERNAL INCLUDES -#include #include #include #include @@ -42,6 +41,9 @@ namespace Internal namespace Adaptor { +class SceneHolder; +using WindowContainer = std::vector; + /** * A class to contain various interfaces provided by the adaptor which * can be used by the cross platform parts of adaptor. @@ -107,6 +109,11 @@ public: */ virtual TraceInterface& GetSystemTraceInterface() = 0; + /** + * Used to access the list of windows from the Render thread + * @param[out] windows The list of created windows + */ + virtual void GetWindowContainerInterface( WindowContainer& windows ) = 0; protected: diff --git a/dali/internal/adaptor/common/adaptor.cpp b/dali/internal/adaptor/common/adaptor.cpp index bb0881b..3915b68 100755 --- a/dali/internal/adaptor/common/adaptor.cpp +++ b/dali/internal/adaptor/common/adaptor.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,7 +24,7 @@ // INTERNAL INCLUDES #include #include -#include +#include #include #include #include @@ -131,11 +131,6 @@ void Adaptor::ReplaceSurface( Dali::Integration::SceneHolder window, Dali::Rende mImpl->ReplaceSurface( window, surface ); } -void Adaptor::DeleteSurface( Dali::RenderSurfaceInterface& surface ) -{ - mImpl->DeleteSurface( surface ); -} - Adaptor::AdaptorSignalType& Adaptor::ResizedSignal() { return mImpl->ResizedSignal(); diff --git a/dali/internal/adaptor/common/application-impl.cpp b/dali/internal/adaptor/common/application-impl.cpp index 28ac1a3..8e38ca5 100755 --- a/dali/internal/adaptor/common/application-impl.cpp +++ b/dali/internal/adaptor/common/application-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -362,12 +362,6 @@ void Application::OnSurfaceCreated( Any newSurface ) void Application::OnSurfaceDestroyed( Any surface ) { - void* windowToDelete = AnyCast< void* >( surface ); - void* oldWindow = AnyCast< void* >( mMainWindow.GetNativeHandle() ); - if( oldWindow == windowToDelete ) - { - mAdaptor->DeleteSurface( mAdaptor->GetSurface() ); - } } void Application::OnResize(Dali::Adaptor& adaptor) diff --git a/dali/internal/adaptor/common/combined-update-render-controller.cpp b/dali/internal/adaptor/common/combined-update-render-controller.cpp index ecd5b8a..77edf45 100644 --- a/dali/internal/adaptor/common/combined-update-render-controller.cpp +++ b/dali/internal/adaptor/common/combined-update-render-controller.cpp @@ -32,6 +32,7 @@ #include #include #include +#include namespace Dali { @@ -113,7 +114,6 @@ CombinedUpdateRenderController::CombinedUpdateRenderController( AdaptorInternalS mPendingRequestUpdate( FALSE ), mUseElapsedTimeAfterWait( FALSE ), mNewSurface( NULL ), - mDeletedSurface( nullptr ), mPostRendering( FALSE ), mSurfaceResized( FALSE ), mForceClear( FALSE ), @@ -177,7 +177,7 @@ void CombinedUpdateRenderController::Start() sem_wait( &mEventThreadSemaphore ); } - Integration::RenderSurface* currentSurface = mAdaptorInterfaces.GetRenderSurfaceInterface(); + Dali::RenderSurfaceInterface* currentSurface = mAdaptorInterfaces.GetRenderSurfaceInterface(); if( currentSurface ) { currentSurface->StartRender(); @@ -234,7 +234,7 @@ void CombinedUpdateRenderController::Stop() LOG_EVENT_TRACE; // Stop Rendering and the Update/Render Thread - Integration::RenderSurface* currentSurface = mAdaptorInterfaces.GetRenderSurfaceInterface(); + Dali::RenderSurfaceInterface* currentSurface = mAdaptorInterfaces.GetRenderSurfaceInterface(); if( currentSurface ) { currentSurface->StopRender(); @@ -322,29 +322,6 @@ void CombinedUpdateRenderController::ReplaceSurface( Dali::RenderSurfaceInterfac } } -void CombinedUpdateRenderController::DeleteSurface( Dali::RenderSurfaceInterface* surface ) -{ - LOG_EVENT_TRACE; - - if( mUpdateRenderThread ) - { - LOG_EVENT( "Starting to delete the surface, event-thread blocked" ); - - // Start replacing the surface. - { - ConditionalWait::ScopedLock lock( mUpdateRenderThreadWaitCondition ); - mPostRendering = FALSE; // Clear the post-rendering flag as Update/Render thread will delete the surface now - mDeletedSurface = surface; - mUpdateRenderThreadWaitCondition.Notify( lock ); - } - - // Wait until the surface has been deleted - sem_wait( &mEventThreadSemaphore ); - - LOG_EVENT( "Surface deleted, event-thread continuing" ); - } -} - void CombinedUpdateRenderController::WaitForGraphicsInitialization() { LOG_EVENT_TRACE; @@ -575,7 +552,7 @@ void CombinedUpdateRenderController::UpdateRenderThread() // REPLACE SURFACE ////////////////////////////// - Integration::RenderSurface* newSurface = ShouldSurfaceBeReplaced(); + Dali::RenderSurfaceInterface* newSurface = ShouldSurfaceBeReplaced(); if( DALI_UNLIKELY( newSurface ) ) { LOG_UPDATE_RENDER_TRACE_FMT( "Replacing Surface" ); @@ -635,6 +612,7 @@ void CombinedUpdateRenderController::UpdateRenderThread() } // Check resize + bool surfaceResized = false; bool shouldSurfaceBeResized = ShouldSurfaceBeResized(); if( DALI_UNLIKELY( shouldSurfaceBeResized ) ) { @@ -642,6 +620,7 @@ void CombinedUpdateRenderController::UpdateRenderThread() { LOG_UPDATE_RENDER_TRACE_FMT( "Resizing Surface" ); SurfaceResized(); + surfaceResized = true; } } @@ -681,22 +660,41 @@ void CombinedUpdateRenderController::UpdateRenderThread() Integration::RenderStatus renderStatus; AddPerformanceMarker( PerformanceInterface::RENDER_START ); - mCore.Render( renderStatus, mForceClear, mUploadWithoutRendering ); - ////////////////////////////// - // DELETE SURFACE - ////////////////////////////// + // Upload shared resources + mCore.PreRender( renderStatus, mForceClear, mUploadWithoutRendering ); - Integration::RenderSurface* deletedSurface = ShouldSurfaceBeDeleted(); - if( DALI_UNLIKELY( deletedSurface ) ) + if ( !mUploadWithoutRendering ) { - LOG_UPDATE_RENDER_TRACE_FMT( "Deleting Surface" ); + // Go through each window + WindowContainer windows; + mAdaptorInterfaces.GetWindowContainerInterface( windows ); + + for ( auto&& iter = windows.begin(); iter != windows.end(); ++iter ) + { + if (*iter) + { + Dali::Integration::Scene scene = (*iter)->GetScene(); + + (*iter)->GetSurface()->InitializeGraphics(); + + // Render off-screen frame buffers first if any + mCore.RenderScene( scene, true ); - mCore.SurfaceDeleted( deletedSurface ); + // Switch to the EGL context of the surface + (*iter)->GetSurface()->PreRender( surfaceResized ); // Switch GL context - SurfaceDeleted(); + // Render the surface + mCore.RenderScene( scene, false ); + + (*iter)->GetSurface()->PostRender( false, false, surfaceResized ); // Swap Buffer + } + } } + mCore.PostRender( mUploadWithoutRendering ); + + AddPerformanceMarker( PerformanceInterface::RENDER_END ); mForceClear = false; @@ -781,14 +779,12 @@ bool CombinedUpdateRenderController::UpdateRenderReady( bool& useElapsedTime, bo ( mUpdateRenderThreadCanSleep && ! updateRequired && ! mPendingRequestUpdate ) ) && // Ensure we wait if we're supposed to be sleeping AND do not require another update ! mDestroyUpdateRenderThread && // Ensure we don't wait if the update-render-thread is supposed to be destroyed ! mNewSurface && // Ensure we don't wait if we need to replace the surface - ! mDeletedSurface && // Ensure we don't wait if we need to delete the surface ! mSurfaceResized ) // Ensure we don't wait if we need to resize the surface { LOG_UPDATE_RENDER( "WAIT: mUpdateRenderRunCount: %d", mUpdateRenderRunCount ); LOG_UPDATE_RENDER( " mUpdateRenderThreadCanSleep: %d, updateRequired: %d, mPendingRequestUpdate: %d", mUpdateRenderThreadCanSleep, updateRequired, mPendingRequestUpdate ); LOG_UPDATE_RENDER( " mDestroyUpdateRenderThread: %d", mDestroyUpdateRenderThread ); LOG_UPDATE_RENDER( " mNewSurface: %d", mNewSurface ); - LOG_UPDATE_RENDER( " mDeletedSurface: %d", mDeletedSurface ); LOG_UPDATE_RENDER( " mSurfaceResized: %d", mSurfaceResized ); // Reset the time when the thread is waiting, so the sleep-until time for @@ -808,7 +804,6 @@ bool CombinedUpdateRenderController::UpdateRenderReady( bool& useElapsedTime, bo LOG_COUNTER_UPDATE_RENDER( "mUpdateRenderThreadCanSleep: %d, updateRequired: %d, mPendingRequestUpdate: %d", mUpdateRenderThreadCanSleep, updateRequired, mPendingRequestUpdate ); LOG_COUNTER_UPDATE_RENDER( "mDestroyUpdateRenderThread: %d", mDestroyUpdateRenderThread ); LOG_COUNTER_UPDATE_RENDER( "mNewSurface: %d", mNewSurface ); - LOG_COUNTER_UPDATE_RENDER( "mDeletedSurface: %d", mDeletedSurface ); LOG_COUNTER_UPDATE_RENDER( "mSurfaceResized: %d", mSurfaceResized ); mUseElapsedTimeAfterWait = FALSE; @@ -826,11 +821,11 @@ bool CombinedUpdateRenderController::UpdateRenderReady( bool& useElapsedTime, bo return ! mDestroyUpdateRenderThread; } -Integration::RenderSurface* CombinedUpdateRenderController::ShouldSurfaceBeReplaced() +Dali::RenderSurfaceInterface* CombinedUpdateRenderController::ShouldSurfaceBeReplaced() { ConditionalWait::ScopedLock lock( mUpdateRenderThreadWaitCondition ); - Integration::RenderSurface* newSurface = mNewSurface; + Dali::RenderSurfaceInterface* newSurface = mNewSurface; mNewSurface = NULL; return newSurface; @@ -842,22 +837,6 @@ void CombinedUpdateRenderController::SurfaceReplaced() sem_post( &mEventThreadSemaphore ); } -Integration::RenderSurface* CombinedUpdateRenderController::ShouldSurfaceBeDeleted() -{ - ConditionalWait::ScopedLock lock( mUpdateRenderThreadWaitCondition ); - - Integration::RenderSurface* deletedSurface = mDeletedSurface; - mDeletedSurface = NULL; - - return deletedSurface; -} - -void CombinedUpdateRenderController::SurfaceDeleted() -{ - // Just increment the semaphore - sem_post( &mEventThreadSemaphore ); -} - bool CombinedUpdateRenderController::ShouldSurfaceBeResized() { ConditionalWait::ScopedLock lock( mUpdateRenderThreadWaitCondition ); @@ -919,7 +898,6 @@ void CombinedUpdateRenderController::PostRenderWaitForCompletion() ConditionalWait::ScopedLock lock( mUpdateRenderThreadWaitCondition ); while( mPostRendering && ! mNewSurface && // We should NOT wait if we're replacing the surface - ! mDeletedSurface && // We should NOT wait if we're deleting the surface ! mDestroyUpdateRenderThread ) { mUpdateRenderThreadWaitCondition.Wait( lock ); diff --git a/dali/internal/adaptor/common/combined-update-render-controller.h b/dali/internal/adaptor/common/combined-update-render-controller.h index edaf83c..7f6f007 100644 --- a/dali/internal/adaptor/common/combined-update-render-controller.h +++ b/dali/internal/adaptor/common/combined-update-render-controller.h @@ -127,11 +127,6 @@ public: virtual void ReplaceSurface( Dali::RenderSurfaceInterface* surface ); /** - * @copydoc ThreadControllerInterface::DeleteSurface() - */ - virtual void DeleteSurface( Dali::RenderSurfaceInterface* surface ); - - /** * @copydoc ThreadControllerInterface::ResizeSurface() */ virtual void ResizeSurface(); @@ -239,7 +234,7 @@ private: * * @return Pointer to the new surface, NULL otherwise */ - Integration::RenderSurface* ShouldSurfaceBeReplaced(); + Dali::RenderSurfaceInterface* ShouldSurfaceBeReplaced(); /** * Called by the Update/Render thread after a surface has been replaced. @@ -249,21 +244,6 @@ private: void SurfaceReplaced(); /** - * Checks to see if the surface needs to be deleted. - * This will lock the mutex in mUpdateRenderThreadWaitCondition. - * - * @return Pointer to the deleted surface, nullptr otherwise - */ - Integration::RenderSurface* ShouldSurfaceBeDeleted(); - - /** - * Called by the Update/Render thread after a surface has been deleted. - * - * This will lock the mutex in mEventThreadWaitCondition - */ - void SurfaceDeleted(); - - /** * Checks to see if the surface needs to be resized. * This will lock the mutex in mUpdateRenderThreadWaitCondition. * @@ -378,8 +358,7 @@ private: volatile unsigned int mUseElapsedTimeAfterWait; ///< Whether we should use the elapsed time after waiting (set by the event-thread, read by the update-render-thread). - Integration::RenderSurface* volatile mNewSurface; ///< Will be set to the new-surface if requested (set by the event-thread, read & cleared by the update-render thread). - Integration::RenderSurface* volatile mDeletedSurface; ///< Will be set to the deleted surface if requested (set by the event-thread, read & cleared by the update-render thread). + Dali::RenderSurfaceInterface* volatile mNewSurface; ///< Will be set to the new-surface if requested (set by the event-thread, read & cleared by the update-render thread). volatile unsigned int mPostRendering; ///< Whether post-rendering is taking place (set by the event & render threads, read by the render-thread). volatile unsigned int mSurfaceResized; ///< Will be set to resize the surface (set by the event-thread, read & cleared by the update-render thread). diff --git a/dali/internal/adaptor/common/thread-controller-interface.h b/dali/internal/adaptor/common/thread-controller-interface.h index 6b9055b..6bf730e 100644 --- a/dali/internal/adaptor/common/thread-controller-interface.h +++ b/dali/internal/adaptor/common/thread-controller-interface.h @@ -93,12 +93,6 @@ public: virtual void ReplaceSurface( Dali::RenderSurfaceInterface* surface ) = 0; /** - * Deletes the surface. - * @param[in] surface The surface to be deleted - */ - virtual void DeleteSurface( Dali::RenderSurfaceInterface* surface ) = 0; - - /** * Resize the surface. */ virtual void ResizeSurface() = 0; diff --git a/dali/internal/graphics/gles/egl-context-helper-implementation.cpp b/dali/internal/graphics/gles/egl-context-helper-implementation.cpp index 7990441..15085a1 100644 --- a/dali/internal/graphics/gles/egl-context-helper-implementation.cpp +++ b/dali/internal/graphics/gles/egl-context-helper-implementation.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,14 +50,6 @@ void EglContextHelperImplementation::MakeSurfacelessContextCurrent() } } -void EglContextHelperImplementation::MakeContextCurrent( Integration::RenderSurface* surface ) -{ - if ( mEglImplementation && surface ) - { - surface->MakeContextCurrent(); - } -} - void EglContextHelperImplementation::MakeContextNull() { if ( mEglImplementation ) diff --git a/dali/internal/graphics/gles/egl-context-helper-implementation.h b/dali/internal/graphics/gles/egl-context-helper-implementation.h index 9236e81..ef38426 100644 --- a/dali/internal/graphics/gles/egl-context-helper-implementation.h +++ b/dali/internal/graphics/gles/egl-context-helper-implementation.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_ADAPTOR_EGL_CONTEXT_HELPER_IMPLEMENTATION_H /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -69,11 +69,6 @@ public: virtual void MakeSurfacelessContextCurrent() override; /** - * @copydoc Dali::Integration::GlContextHelperAbstraction::MakeContextCurrent() - */ - virtual void MakeContextCurrent( Integration::RenderSurface* surface ) override; - - /** * @copydoc Dali::Integration::GlContextHelperAbstraction::MakeContextNull() */ virtual void MakeContextNull() override; diff --git a/dali/internal/imaging/android/native-image-source-impl-android.cpp b/dali/internal/imaging/android/native-image-source-impl-android.cpp index 4d4ee1b..fcf3ae5 100644 --- a/dali/internal/imaging/android/native-image-source-impl-android.cpp +++ b/dali/internal/imaging/android/native-image-source-impl-android.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,7 +30,7 @@ // INTERNAL INCLUDES #include -#include +#include #include #include #include diff --git a/dali/internal/imaging/tizen/native-image-source-impl-tizen.cpp b/dali/internal/imaging/tizen/native-image-source-impl-tizen.cpp index 987a357..6970fc0 100755 --- a/dali/internal/imaging/tizen/native-image-source-impl-tizen.cpp +++ b/dali/internal/imaging/tizen/native-image-source-impl-tizen.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ #include #include #include -#include +#include // Allow this to be encoded and saved: #include diff --git a/dali/internal/imaging/ubuntu-x11/native-image-source-impl-x.cpp b/dali/internal/imaging/ubuntu-x11/native-image-source-impl-x.cpp index 82518f5..6391c8f 100644 --- a/dali/internal/imaging/ubuntu-x11/native-image-source-impl-x.cpp +++ b/dali/internal/imaging/ubuntu-x11/native-image-source-impl-x.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,8 +29,7 @@ #include #include #include -#include - +#include namespace Dali { diff --git a/dali/internal/imaging/windows/native-image-source-impl-win.cpp b/dali/internal/imaging/windows/native-image-source-impl-win.cpp index b0e78fb..95761b7 100755 --- a/dali/internal/imaging/windows/native-image-source-impl-win.cpp +++ b/dali/internal/imaging/windows/native-image-source-impl-win.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,7 +27,7 @@ #include #include #include -#include +#include namespace Dali { diff --git a/dali/internal/system/common/thread-controller.cpp b/dali/internal/system/common/thread-controller.cpp index a9054ec..e5902cb 100644 --- a/dali/internal/system/common/thread-controller.cpp +++ b/dali/internal/system/common/thread-controller.cpp @@ -90,11 +90,6 @@ void ThreadController::ReplaceSurface( Dali::RenderSurfaceInterface* newSurface mThreadControllerInterface->ReplaceSurface( newSurface ); } -void ThreadController::DeleteSurface( Dali::RenderSurfaceInterface* surface ) -{ - mThreadControllerInterface->DeleteSurface( surface ); -} - void ThreadController::ResizeSurface() { mThreadControllerInterface->ResizeSurface(); diff --git a/dali/internal/system/common/thread-controller.h b/dali/internal/system/common/thread-controller.h index c4f3961..aeac0af 100644 --- a/dali/internal/system/common/thread-controller.h +++ b/dali/internal/system/common/thread-controller.h @@ -112,12 +112,6 @@ public: void ReplaceSurface( Dali::RenderSurfaceInterface* surface ); /** - * Deletes the surface. - * @param surface The surface to be deleted - */ - void DeleteSurface( Dali::RenderSurfaceInterface* surface ); - - /** * Resize the surface. */ void ResizeSurface(); diff --git a/dali/internal/window-system/android/display-connection-impl-android.cpp b/dali/internal/window-system/android/display-connection-impl-android.cpp index eb9c7b2..bcf14ff 100644 --- a/dali/internal/window-system/android/display-connection-impl-android.cpp +++ b/dali/internal/window-system/android/display-connection-impl-android.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -40,7 +40,7 @@ DisplayConnection* DisplayConnectionAndroid::New() DisplayConnectionAndroid::DisplayConnectionAndroid() : mDisplay( NULL ), - mSurfaceType( Integration::RenderSurface::WINDOW_RENDER_SURFACE ), + mSurfaceType( RenderSurfaceInterface::WINDOW_RENDER_SURFACE ), mGraphics( nullptr ) { } @@ -70,7 +70,7 @@ bool DisplayConnectionAndroid::InitializeGraphics() return true; } -void DisplayConnectionAndroid::SetSurfaceType( Integration::RenderSurface::Type type ) +void DisplayConnectionAndroid::SetSurfaceType( Dali::RenderSurfaceInterface::Type type ) { mSurfaceType = type; mDisplay = EGL_DEFAULT_DISPLAY; diff --git a/dali/internal/window-system/android/display-connection-impl-android.h b/dali/internal/window-system/android/display-connection-impl-android.h index 435098a..0f1691c 100644 --- a/dali/internal/window-system/android/display-connection-impl-android.h +++ b/dali/internal/window-system/android/display-connection-impl-android.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_WINDOWSYSTEM_DISPLAY_CONNECTION_IMPL_ANDROID_H /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -72,7 +72,7 @@ public: * @brief Sets the surface type * @param[in] type The surface type */ - void SetSurfaceType( Integration::RenderSurface::Type type ); + void SetSurfaceType( Dali::RenderSurfaceInterface::Type type ); /** * @brief Sets the graphics interface @@ -97,7 +97,7 @@ protected: private: EGLNativeDisplayType mDisplay; ///< EGL display for rendering - Integration::RenderSurface::Type mSurfaceType; ///< The surface type + Dali::RenderSurfaceInterface::Type mSurfaceType; ///< The surface type GraphicsInterface* mGraphics; ///< The graphics interface }; diff --git a/dali/internal/window-system/common/display-connection-impl.h b/dali/internal/window-system/common/display-connection-impl.h index 4c21cb6..8ced957 100644 --- a/dali/internal/window-system/common/display-connection-impl.h +++ b/dali/internal/window-system/common/display-connection-impl.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_WINDOWSYSTEM_COMMON_DISPLAY_CONNECTION_IMPL_H /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -74,7 +74,7 @@ public: * Sets the render surface type * @param[in] type The render surface type */ - virtual void SetSurfaceType( Integration::RenderSurface::Type type ) = 0; + virtual void SetSurfaceType( Dali::RenderSurfaceInterface::Type type ) = 0; /** * Sets the graphics interface diff --git a/dali/internal/window-system/common/display-connection.cpp b/dali/internal/window-system/common/display-connection.cpp index 8d3a080..a91d507 100644 --- a/dali/internal/window-system/common/display-connection.cpp +++ b/dali/internal/window-system/common/display-connection.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,7 +38,7 @@ DisplayConnection* DisplayConnection::New( Dali::Internal::Adaptor::GraphicsInte return new DisplayConnection(internal); } -DisplayConnection* DisplayConnection::New( Dali::Internal::Adaptor::GraphicsInterface& graphics, Integration::RenderSurface::Type type ) +DisplayConnection* DisplayConnection::New( Dali::Internal::Adaptor::GraphicsInterface& graphics, Dali::RenderSurfaceInterface::Type type ) { auto factory = Dali::Internal::Adaptor::GetDisplayConnectionFactory(); auto displayConnection = factory->CreateDisplayConnection(); diff --git a/dali/internal/window-system/common/display-connection.h b/dali/internal/window-system/common/display-connection.h index 00c67c8..3982d09 100644 --- a/dali/internal/window-system/common/display-connection.h +++ b/dali/internal/window-system/common/display-connection.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_WINDOWSYSTEM_COMMON_DISPLAY_CONNECTION_H /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ #include // INTERNAL INCLUDES -#include +#include #include @@ -56,7 +56,7 @@ public: * @param[in] type Render surface type * @return A handle to a newly allocated DisplayConnection resource. */ - static DisplayConnection* New( Dali::Internal::Adaptor::GraphicsInterface& graphics, Integration::RenderSurface::Type type ); + static DisplayConnection* New( Dali::Internal::Adaptor::GraphicsInterface& graphics, Dali::RenderSurfaceInterface::Type type ); /** * @brief Create a DisplayConnection handle; this can be initialised with DisplayConnection::New(). diff --git a/dali/internal/window-system/common/pixmap-render-surface.h b/dali/internal/window-system/common/pixmap-render-surface.h index 0e4fcb1..53f03b5 100644 --- a/dali/internal/window-system/common/pixmap-render-surface.h +++ b/dali/internal/window-system/common/pixmap-render-surface.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_WINDOWSYSTEM_COMMON_PIXMAP_RENDER_SURFACE_H /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -64,7 +64,7 @@ public: // API virtual void SetRenderNotification( TriggerEventInterface* renderNotification ) = 0; /** - * @copydoc Dali::Integration::RenderSurface::GetDepthBufferRequired() + * @copydoc Dali::RenderSurfaceInterface::GetDepthBufferRequired() */ Integration::DepthBufferAvailable GetDepthBufferRequired() override { @@ -72,7 +72,7 @@ public: // API } /** - * @copydoc Dali::Integration::RenderSurface::GetStencilBufferRequired() + * @copydoc Dali::RenderSurfaceInterface::GetStencilBufferRequired() */ Integration::StencilBufferAvailable GetStencilBufferRequired() override { diff --git a/dali/internal/window-system/common/render-surface-factory.h b/dali/internal/window-system/common/render-surface-factory.h index 6c7a255..408ae14 100644 --- a/dali/internal/window-system/common/render-surface-factory.h +++ b/dali/internal/window-system/common/render-surface-factory.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_WINDOWSYSTEM_COMMON_RENDER_SURFACE_FACTORY_H /* - * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,7 +19,7 @@ */ // INTERNAL INCLUDES -#include +#include // EXTERNAL INCLUDES #include diff --git a/dali/internal/window-system/common/window-render-surface.cpp b/dali/internal/window-system/common/window-render-surface.cpp index 6d4ba4f..f86d7c2 100644 --- a/dali/internal/window-system/common/window-render-surface.cpp +++ b/dali/internal/window-system/common/window-render-surface.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -459,9 +459,9 @@ void WindowRenderSurface::ReleaseLock() // Nothing to do. } -Integration::RenderSurface::Type WindowRenderSurface::GetSurfaceType() +Dali::RenderSurfaceInterface::Type WindowRenderSurface::GetSurfaceType() { - return RenderSurface::WINDOW_RENDER_SURFACE; + return Dali::RenderSurfaceInterface::WINDOW_RENDER_SURFACE; } void WindowRenderSurface::MakeContextCurrent() diff --git a/dali/internal/window-system/common/window-render-surface.h b/dali/internal/window-system/common/window-render-surface.h index a72707e..f8160b8 100644 --- a/dali/internal/window-system/common/window-render-surface.h +++ b/dali/internal/window-system/common/window-render-surface.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_WINDOWSYSTEM_COMMON_WINDOW_RENDER_SURFACE_H /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -112,10 +112,10 @@ public: // API */ OutputSignalType& OutputTransformedSignal(); -public: // from Dali::Integration::RenderSurface +public: // from Dali::RenderSurfaceInterface /** - * @copydoc Dali::Integration::RenderSurface::GetPositionSize() + * @copydoc Dali::RenderSurfaceInterface::GetPositionSize() */ virtual PositionSize GetPositionSize() const override; @@ -124,77 +124,77 @@ public: // from Dali::Integration::RenderSurface virtual void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical ) override; /** - * @copydoc Dali::Integration::RenderSurface::InitializeGraphics() + * @copydoc Dali::RenderSurfaceInterface::InitializeGraphics() */ virtual void InitializeGraphics() override; /** - * @copydoc Dali::Integration::RenderSurface::CreateSurface() + * @copydoc Dali::RenderSurfaceInterface::CreateSurface() */ virtual void CreateSurface() override; /** - * @copydoc Dali::Integration::RenderSurface::DestroySurface() + * @copydoc Dali::RenderSurfaceInterface::DestroySurface() */ virtual void DestroySurface() override; /** - * @copydoc Dali::Integration::RenderSurface::ReplaceGraphicsSurface() + * @copydoc Dali::RenderSurfaceInterface::ReplaceGraphicsSurface() */ virtual bool ReplaceGraphicsSurface() override; /** - * @copydoc Dali::Integration::RenderSurface::MoveResize() + * @copydoc Dali::RenderSurfaceInterface::MoveResize() */ virtual void MoveResize( Dali::PositionSize positionSize) override; /** - * @copydoc Dali::Integration::RenderSurface::StartRender() + * @copydoc Dali::RenderSurfaceInterface::StartRender() */ virtual void StartRender() override; /** - * @copydoc Dali::Integration::RenderSurface::PreRender() + * @copydoc Dali::RenderSurfaceInterface::PreRender() */ virtual bool PreRender( bool resizingSurface ) override; /** - * @copydoc Dali::Integration::RenderSurface::PostRender() + * @copydoc Dali::RenderSurfaceInterface::PostRender() */ virtual void PostRender( bool renderToFbo, bool replacingSurface, bool resizingSurface ); /** - * @copydoc Dali::Integration::RenderSurface::StopRender() + * @copydoc Dali::RenderSurfaceInterface::StopRender() */ virtual void StopRender() override; /** - * @copydoc Dali::Integration::RenderSurface::SetThreadSynchronization + * @copydoc Dali::RenderSurfaceInterface::SetThreadSynchronization */ virtual void SetThreadSynchronization( ThreadSynchronizationInterface& threadSynchronization ) override; /** - * @copydoc Dali::Integration::RenderSurface::ReleaseLock() + * @copydoc Dali::RenderSurfaceInterface::ReleaseLock() */ virtual void ReleaseLock() override; /** - * @copydoc Dali::Integration::RenderSurface::GetSurfaceType() + * @copydoc Dali::RenderSurfaceInterface::GetSurfaceType() */ - virtual Integration::RenderSurface::Type GetSurfaceType() override; + virtual Dali::RenderSurfaceInterface::Type GetSurfaceType() override; /** - * @copydoc Dali::Integration::RenderSurface::MakeContextCurrent() + * @copydoc Dali::RenderSurfaceInterface::MakeContextCurrent() */ virtual void MakeContextCurrent() override; /** - * @copydoc Dali::Integration::RenderSurface::GetDepthBufferRequired() + * @copydoc Dali::RenderSurfaceInterface::GetDepthBufferRequired() */ virtual Integration::DepthBufferAvailable GetDepthBufferRequired() override; /** - * @copydoc Dali::Integration::RenderSurface::GetStencilBufferRequired() + * @copydoc Dali::RenderSurfaceInterface::GetStencilBufferRequired() */ virtual Integration::StencilBufferAvailable GetStencilBufferRequired() override; diff --git a/dali/internal/window-system/tizen-wayland/display-connection-impl-ecore-wl.cpp b/dali/internal/window-system/tizen-wayland/display-connection-impl-ecore-wl.cpp index a445c5c..3d9911b 100755 --- a/dali/internal/window-system/tizen-wayland/display-connection-impl-ecore-wl.cpp +++ b/dali/internal/window-system/tizen-wayland/display-connection-impl-ecore-wl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -47,14 +47,14 @@ DisplayConnection* DisplayConnectionEcoreWl::New() DisplayConnectionEcoreWl::DisplayConnectionEcoreWl() : mDisplay( NULL ), - mSurfaceType( Integration::RenderSurface::WINDOW_RENDER_SURFACE ), + mSurfaceType( RenderSurfaceInterface::WINDOW_RENDER_SURFACE ), mGraphics( nullptr ) { } DisplayConnectionEcoreWl::~DisplayConnectionEcoreWl() { - if( mSurfaceType == Integration::RenderSurface::NATIVE_RENDER_SURFACE ) + if( mSurfaceType == RenderSurfaceInterface::NATIVE_RENDER_SURFACE ) { ReleaseNativeDisplay(); } @@ -83,11 +83,11 @@ bool DisplayConnectionEcoreWl::InitializeGraphics() return true; } -void DisplayConnectionEcoreWl::SetSurfaceType( Integration::RenderSurface::Type type ) +void DisplayConnectionEcoreWl::SetSurfaceType( Dali::RenderSurfaceInterface::Type type ) { mSurfaceType = type; - if( mSurfaceType == Integration::RenderSurface::NATIVE_RENDER_SURFACE ) + if( mSurfaceType == Dali::RenderSurfaceInterface::NATIVE_RENDER_SURFACE ) { mDisplay = GetNativeDisplay(); } diff --git a/dali/internal/window-system/tizen-wayland/display-connection-impl-ecore-wl.h b/dali/internal/window-system/tizen-wayland/display-connection-impl-ecore-wl.h index 6bcf33d..d3471f2 100644 --- a/dali/internal/window-system/tizen-wayland/display-connection-impl-ecore-wl.h +++ b/dali/internal/window-system/tizen-wayland/display-connection-impl-ecore-wl.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_WINDOWSYSTEM_ECOREWL_DISPLAY_CONNECTION_IMPL_ECORE_WL_H /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -72,7 +72,7 @@ public: * @brief Sets the surface type * @param[in] type The surface type */ - void SetSurfaceType( Integration::RenderSurface::Type type ); + void SetSurfaceType( Dali::RenderSurfaceInterface::Type type ); /** * @brief Sets the graphics interface @@ -107,7 +107,7 @@ protected: private: EGLNativeDisplayType mDisplay; ///< Wayland-display for rendering - Integration::RenderSurface::Type mSurfaceType; ///< The surface type + Dali::RenderSurfaceInterface::Type mSurfaceType; ///< The surface type GraphicsInterface* mGraphics; ///< The graphics interface }; diff --git a/dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.cpp b/dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.cpp index 250ad9e..3ef4f68 100644 --- a/dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.cpp +++ b/dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -283,9 +283,9 @@ void NativeRenderSurfaceEcoreWl::SetThreadSynchronization( ThreadSynchronization mThreadSynchronization = &threadSynchronization; } -Integration::RenderSurface::Type NativeRenderSurfaceEcoreWl::GetSurfaceType() +Dali::RenderSurfaceInterface::Type NativeRenderSurfaceEcoreWl::GetSurfaceType() { - return Integration::RenderSurface::NATIVE_RENDER_SURFACE; + return Dali::RenderSurfaceInterface::NATIVE_RENDER_SURFACE; } void NativeRenderSurfaceEcoreWl::MakeContextCurrent() diff --git a/dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.h b/dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.h index a3dec6a..e3a33ba 100644 --- a/dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.h +++ b/dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_WINDOWSYSTEM_TIZENWAYLAND_NATIVE_SURFACE_ECORE_WL_H /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -71,92 +71,92 @@ public: // from WindowRenderSurface */ virtual void WaitUntilSurfaceReplaced() override; -public: // from Dali::Integration::RenderSurface +public: // from Dali::RenderSurfaceInterface /** - * @copydoc Dali::Integration::RenderSurface::GetPositionSize() + * @copydoc Dali::RenderSurfaceInterface::GetPositionSize() */ virtual PositionSize GetPositionSize() const override; /** - * @copydoc Dali::Integration::RenderSurface::GetDpi() + * @copydoc Dali::RenderSurfaceInterface::GetDpi() */ virtual void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical ) override; /** - * @copydoc Dali::Integration::RenderSurface::InitializeGraphics() + * @copydoc Dali::RenderSurfaceInterface::InitializeGraphics() */ virtual void InitializeGraphics() override; /** - * @copydoc Dali::Integration::RenderSurface::CreateSurface() + * @copydoc Dali::RenderSurfaceInterface::CreateSurface() */ virtual void CreateSurface() override; /** - * @copydoc Dali::Integration::RenderSurface::DestroySurface() + * @copydoc Dali::RenderSurfaceInterface::DestroySurface() */ virtual void DestroySurface() override; /** - * @copydoc Dali::Integration::RenderSurface::ReplaceGraphicsSurface() + * @copydoc Dali::RenderSurfaceInterface::ReplaceGraphicsSurface() */ virtual bool ReplaceGraphicsSurface() override; /** - * @copydoc Dali::Integration::RenderSurface::MoveResize() + * @copydoc Dali::RenderSurfaceInterface::MoveResize() */ virtual void MoveResize( Dali::PositionSize positionSize) override; /** - * @copydoc Dali::Integration::RenderSurface::StartRender() + * @copydoc Dali::RenderSurfaceInterface::StartRender() */ virtual void StartRender() override; /** - * @copydoc Dali::Integration::RenderSurface::PreRender() + * @copydoc Dali::RenderSurfaceInterface::PreRender() */ virtual bool PreRender( bool resizingSurface ) override; /** - * @copydoc Dali::Integration::RenderSurface::PostRender() + * @copydoc Dali::RenderSurfaceInterface::PostRender() */ virtual void PostRender( bool renderToFbo, bool replacingSurface, bool resizingSurface ); /** - * @copydoc Dali::Integration::RenderSurface::StopRender() + * @copydoc Dali::RenderSurfaceInterface::StopRender() */ virtual void StopRender() override; /** - * @copydoc Dali::Integration::RenderSurface::SetThreadSynchronization + * @copydoc Dali::RenderSurfaceInterface::SetThreadSynchronization */ virtual void SetThreadSynchronization( ThreadSynchronizationInterface& threadSynchronization )override; /** - * @copydoc Dali::Integration::RenderSurface::GetSurfaceType() + * @copydoc Dali::RenderSurfaceInterface::GetSurfaceType() */ - virtual Integration::RenderSurface::Type GetSurfaceType() override; + virtual Dali::RenderSurfaceInterface::Type GetSurfaceType() override; /** - * @copydoc Dali::Integration::RenderSurface::MakeContextCurrent() + * @copydoc Dali::RenderSurfaceInterface::MakeContextCurrent() */ virtual void MakeContextCurrent() override; /** - * @copydoc Dali::Integration::RenderSurface::GetDepthBufferRequired() + * @copydoc Dali::RenderSurfaceInterface::GetDepthBufferRequired() */ virtual Integration::DepthBufferAvailable GetDepthBufferRequired() override; /** - * @copydoc Dali::Integration::RenderSurface::GetStencilBufferRequired() + * @copydoc Dali::RenderSurfaceInterface::GetStencilBufferRequired() */ virtual Integration::StencilBufferAvailable GetStencilBufferRequired() override; private: /** - * @copydoc Dali::Integration::RenderSurface::ReleaseLock() + * @copydoc Dali::RenderSurfaceInterface::ReleaseLock() */ virtual void ReleaseLock() override; diff --git a/dali/internal/window-system/ubuntu-x11/display-connection-impl-x.cpp b/dali/internal/window-system/ubuntu-x11/display-connection-impl-x.cpp index 1e85ebe..78c3fc0 100644 --- a/dali/internal/window-system/ubuntu-x11/display-connection-impl-x.cpp +++ b/dali/internal/window-system/ubuntu-x11/display-connection-impl-x.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -97,9 +97,9 @@ bool DisplayConnectionX11::InitializeGraphics() return true; } -void DisplayConnectionX11::SetSurfaceType( Integration::RenderSurface::Type type ) +void DisplayConnectionX11::SetSurfaceType( Dali::RenderSurfaceInterface::Type type ) { - if( type == Integration::RenderSurface::WINDOW_RENDER_SURFACE ) + if( type == Dali::RenderSurfaceInterface::WINDOW_RENDER_SURFACE ) { // Because of DDK issue, we need to use separated x display instead of ecore default display mDisplay = XOpenDisplay(0); diff --git a/dali/internal/window-system/ubuntu-x11/display-connection-impl-x.h b/dali/internal/window-system/ubuntu-x11/display-connection-impl-x.h index 4f6890f..64ffb76 100644 --- a/dali/internal/window-system/ubuntu-x11/display-connection-impl-x.h +++ b/dali/internal/window-system/ubuntu-x11/display-connection-impl-x.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_WINDOWSYSTEM_ECOREX_DISPLAY_CONNECTION_IMPL_ECORE_X_H /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -81,7 +81,7 @@ public: /** * @copydoc Dali::Internal::Adaptor::DisplayConnection::SetSurfaceType */ - void SetSurfaceType( Integration::RenderSurface::Type type ); + void SetSurfaceType( Dali::RenderSurfaceInterface::Type type ); /** * @copydoc Dali::Internal::Adaptor::DisplayConnection::SetGraphicsInterface diff --git a/dali/internal/window-system/ubuntu-x11/pixmap-render-surface-ecore-x.cpp b/dali/internal/window-system/ubuntu-x11/pixmap-render-surface-ecore-x.cpp index 21d84d0..2e93140 100644 --- a/dali/internal/window-system/ubuntu-x11/pixmap-render-surface-ecore-x.cpp +++ b/dali/internal/window-system/ubuntu-x11/pixmap-render-surface-ecore-x.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -309,9 +309,9 @@ void PixmapRenderSurfaceEcoreX::ReleaseLock() } } -Integration::RenderSurface::Type PixmapRenderSurfaceEcoreX::GetSurfaceType() +Dali::RenderSurfaceInterface::Type PixmapRenderSurfaceEcoreX::GetSurfaceType() { - return Integration::RenderSurface::PIXMAP_RENDER_SURFACE; + return Dali::RenderSurfaceInterface::PIXMAP_RENDER_SURFACE; } void PixmapRenderSurfaceEcoreX::MakeContextCurrent() diff --git a/dali/internal/window-system/ubuntu-x11/pixmap-render-surface-ecore-x.h b/dali/internal/window-system/ubuntu-x11/pixmap-render-surface-ecore-x.h index a96bcdc..034fee6 100644 --- a/dali/internal/window-system/ubuntu-x11/pixmap-render-surface-ecore-x.h +++ b/dali/internal/window-system/ubuntu-x11/pixmap-render-surface-ecore-x.h @@ -2,7 +2,7 @@ #define DALI_ECORE_X_PIXMAP_RENDER_SURFACE_H /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -69,82 +69,82 @@ public: // from WindowRenderSurface */ virtual void SetRenderNotification( TriggerEventInterface* renderNotification ) override; -public: // from Dali::Integration::RenderSurface +public: // from Dali::RenderSurfaceInterface /** - * @copydoc Dali::Integration::RenderSurface::GetPositionSize() + * @copydoc Dali::RenderSurfaceInterface::GetPositionSize() */ virtual PositionSize GetPositionSize() const override; /** - * @copydoc Dali::Integration::RenderSurface::GetDpi() + * @copydoc Dali::RenderSurfaceInterface::GetDpi() */ virtual void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical ) override; /** - * @copydoc Dali::Integration::RenderSurface::InitializeGraphics() + * @copydoc Dali::RenderSurfaceInterface::InitializeGraphics() */ virtual void InitializeGraphics() override; /** - * @copydoc Dali::Integration::RenderSurface::CreateSurface() + * @copydoc Dali::RenderSurfaceInterface::CreateSurface() */ virtual void CreateSurface() override; /** - * @copydoc Dali::Integration::RenderSurface::DestroySurface() + * @copydoc Dali::RenderSurfaceInterface::DestroySurface() */ virtual void DestroySurface() override; /** - * @copydoc Dali::Integration::RenderSurface::ReplaceGraphicsSurface() + * @copydoc Dali::RenderSurfaceInterface::ReplaceGraphicsSurface() */ virtual bool ReplaceGraphicsSurface() override; /** - * @copydoc Dali::Integration::RenderSurface::MoveResize() + * @copydoc Dali::RenderSurfaceInterface::MoveResize() */ virtual void MoveResize( Dali::PositionSize positionSize) override {} /** - * @copydoc Dali::Integration::RenderSurface::StartRender() + * @copydoc Dali::RenderSurfaceInterface::StartRender() */ virtual void StartRender() override; /** - * @copydoc Dali::Integration::RenderSurface::PreRender() + * @copydoc Dali::RenderSurfaceInterface::PreRender() */ virtual bool PreRender( bool resizingSurface ) override; /** - * @copydoc Dali::Integration::RenderSurface::PostRender() + * @copydoc Dali::RenderSurfaceInterface::PostRender() */ virtual void PostRender( bool renderToFbo, bool replacingSurface, bool resizingSurface ) override; /** - * @copydoc Dali::Integration::RenderSurface::StopRender() + * @copydoc Dali::RenderSurfaceInterface::StopRender() */ virtual void StopRender() override; /** - * @copydoc Dali::Integration::RenderSurface::SetThreadSynchronization + * @copydoc Dali::RenderSurfaceInterface::SetThreadSynchronization */ virtual void SetThreadSynchronization( ThreadSynchronizationInterface& threadSynchronization ) override; /** - * @copydoc Dali::Integration::RenderSurface::GetSurfaceType() + * @copydoc Dali::RenderSurfaceInterface::GetSurfaceType() */ - virtual Integration::RenderSurface::Type GetSurfaceType() override; + virtual Dali::RenderSurfaceInterface::Type GetSurfaceType() override; /** - * @copydoc Dali::Integration::RenderSurface::MakeContextCurrent() + * @copydoc Dali::RenderSurfaceInterface::MakeContextCurrent() */ virtual void MakeContextCurrent() override; private: // from PixmapRenderSurface /** - * @copydoc Dali::Integration::RenderSurface::ReleaseLock() + * @copydoc Dali::RenderSurfaceInterface::ReleaseLock() */ virtual void ReleaseLock() override; diff --git a/dali/internal/window-system/windows/display-connection-impl-win.cpp b/dali/internal/window-system/windows/display-connection-impl-win.cpp index c8d7e90..59babb4 100755 --- a/dali/internal/window-system/windows/display-connection-impl-win.cpp +++ b/dali/internal/window-system/windows/display-connection-impl-win.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -85,9 +85,9 @@ bool DisplayConnectionWin::InitializeGraphics() return true; } -void DisplayConnectionWin::SetSurfaceType( Dali::Integration::RenderSurface::Type type ) +void DisplayConnectionWin::SetSurfaceType( Dali::RenderSurfaceInterface::Type type ) { - if( type == Dali::Integration::RenderSurface::WINDOW_RENDER_SURFACE ) + if( type == Dali::RenderSurfaceInterface::WINDOW_RENDER_SURFACE ) { mDisplay = GetDC( GetForegroundWindow() ); } diff --git a/dali/internal/window-system/windows/display-connection-impl-win.h b/dali/internal/window-system/windows/display-connection-impl-win.h index a81072f..636419e 100755 --- a/dali/internal/window-system/windows/display-connection-impl-win.h +++ b/dali/internal/window-system/windows/display-connection-impl-win.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_WIN_DIPLAY_CONNECTION_H /* - * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -79,7 +79,7 @@ public: /** * @copydoc Dali::Internal::Adaptor::DisplayConnection::SetSurfaceType */ - void SetSurfaceType( Dali::Integration::RenderSurface::Type type ); + void SetSurfaceType( Dali::RenderSurfaceInterface::Type type ); /** * @copydoc Dali::Internal::Adaptor::DisplayConnection::SetGraphicsInterface -- 2.7.4