../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
)
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
)
uint32_t horizontalDpi,
uint32_t verticalDpi,
bool initialize )
-: mRenderSurface( NULL ),
- mCore( NULL ),
+: mCore( NULL ),
mSurfaceWidth( surfaceWidth ),
mSurfaceHeight( surfaceHeight ),
mFrame( 0u ),
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<float>( mSurfaceWidth ), static_cast<float>( mSurfaceHeight ) ) );
mScene.SetDpi( Vector2( static_cast<float>( mDpi.x ), static_cast<float>( mDpi.y ) ) );
}
TestApplication::~TestApplication()
{
Dali::Integration::Log::UninstallLogFunction();
- delete mRenderSurface;
delete mCore;
}
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++;
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++;
#include "test-gl-abstraction.h"
#include "test-gl-context-helper-abstraction.h"
#include "test-render-controller.h"
-#include "test-render-surface.h"
#include <dali/public-api/common/dali-common.h>
#include <dali/integration-api/resource-policies.h>
#include <dali/integration-api/trace.h>
TestGlAbstraction mGlAbstraction;
TestGlSyncAbstraction mGlSyncAbstraction;
TestGlContextHelperAbstraction mGlContextHelperAbstraction;
- TestRenderSurface* mRenderSurface;
Integration::UpdateStatus mStatus;
Integration::RenderStatus mRenderStatus;
#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.
*/
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
*/
+++ /dev/null
-/*
- * 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
+++ /dev/null
-#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 <dali/public-api/common/dali-common.h>
-#include <dali/integration-api/render-surface.h>
-
-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
../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
/*
- * 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.
#include <iostream>
#include <dali/public-api/dali-core.h>
#include <dali/devel-api/adaptor-framework/orientation.h>
-#include <dali/integration-api/render-surface.h>
// INTERNAL INCLUDES
#include <dali/public-api/adaptor-framework/timer.h>
#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.
*/
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.
*
#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.
*/
// EXTERNAL INCLUDES
-#include <dali/integration-api/render-surface.h>
#include <dali/integration-api/core-enumerations.h>
#include <dali/public-api/math/vector4.h>
+#include <dali/public-api/math/rect.h>
+#include <dali/public-api/object/any.h>
namespace Dali
{
}
}
+/**
+ * @brief The position and size of the render surface.
+ */
+typedef Dali::Rect<int> PositionSize;
+
/**
* @brief Interface for a render surface onto which Dali draws.
*
* 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
/**
* @brief Gets the surface type
*/
- virtual Dali::Integration::RenderSurface::Type GetSurfaceType() = 0;
+ virtual Dali::RenderSurfaceInterface::Type GetSurfaceType() = 0;
/**
* @brief Makes the graphics context current
/*
- * 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.
mAdaptor->RemoveObserver( *mLifeCycleObserver.get() );
mAdaptor->RemoveWindow( this );
- mAdaptor->DeleteSurface( *mSurface.get() );
-
mAdaptor = nullptr;
}
{
mSurface.reset( surface );
- mScene.SetSurface( *mSurface.get() );
+ mScene.SurfaceReplaced();
+
+ SurfaceResized();
unsigned int dpiHorizontal, dpiVertical;
dpiHorizontal = dpiVertical = 0;
void SceneHolder::SurfaceResized()
{
- mScene.SurfaceResized();
+ PositionSize surfacePositionSize = mSurface->GetPositionSize();
+ mScene.SurfaceResized( static_cast<float>( surfacePositionSize.width ), static_cast<float>( surfacePositionSize.height ) );
}
Dali::RenderSurfaceInterface* SceneHolder::GetSurface() const
mAdaptorStarted = true;
// Create the scene
- mScene = Dali::Integration::Scene::New( *mSurface );
+ PositionSize surfacePositionSize = mSurface->GetPositionSize();
+ mScene = Dali::Integration::Scene::New( Size(static_cast<float>( surfacePositionSize.width ), static_cast<float>( surfacePositionSize.height )) );
Internal::Adaptor::Adaptor& adaptorImpl = Internal::Adaptor::Adaptor::GetImplementation( adaptor );
mAdaptor = &adaptorImpl;
}
}
-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();
return *mPlatformAbstraction;
}
+void Adaptor::GetWindowContainerInterface( WindowContainer& windows )
+{
+ windows = mWindows;
+}
+
void Adaptor::DestroyTtsPlayer(Dali::TtsPlayer::Mode mode)
{
if( mTtsPlayers[mode] )
*/
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.
*
*/
virtual TraceInterface& GetSystemTraceInterface();
+ /**
+ * copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetWindowContainerInterface()
+ */
+ virtual void GetWindowContainerInterface( WindowContainer& windows );
+
public: // Signals
/**
#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.
#include <dali/integration-api/gl-abstraction.h>
// INTERNAL INCLUDES
-#include <dali/integration-api/render-surface.h>
#include <dali/integration-api/adaptor-framework/render-surface-interface.h>
#include <dali/integration-api/adaptor-framework/trigger-event-interface.h>
#include <dali/internal/graphics/common/graphics-interface.h>
namespace Adaptor
{
+class SceneHolder;
+using WindowContainer = std::vector<Internal::Adaptor::SceneHolder*>;
+
/**
* A class to contain various interfaces provided by the adaptor which
* can be used by the cross platform parts of adaptor.
*/
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:
/*
- * 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.
// INTERNAL INCLUDES
#include <dali/devel-api/adaptor-framework/accessibility-adaptor.h>
#include <dali/devel-api/adaptor-framework/style-monitor.h>
-#include <dali/integration-api/render-surface.h>
+#include <dali/integration-api/adaptor-framework/render-surface-interface.h>
#include <dali/integration-api/adaptor-framework/scene-holder.h>
#include <dali/internal/adaptor/common/adaptor-impl.h>
#include <dali/internal/window-system/common/window-impl.h>
mImpl->ReplaceSurface( window, surface );
}
-void Adaptor::DeleteSurface( Dali::RenderSurfaceInterface& surface )
-{
- mImpl->DeleteSurface( surface );
-}
-
Adaptor::AdaptorSignalType& Adaptor::ResizedSignal()
{
return mImpl->ResizedSignal();
/*
- * 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.
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)
#include <dali/internal/graphics/common/graphics-interface.h>
#include <dali/internal/system/common/environment-options.h>
#include <dali/internal/system/common/time-service.h>
+#include <dali/internal/window-system/common/window-impl.h>
namespace Dali
{
mPendingRequestUpdate( FALSE ),
mUseElapsedTimeAfterWait( FALSE ),
mNewSurface( NULL ),
- mDeletedSurface( nullptr ),
mPostRendering( FALSE ),
mSurfaceResized( FALSE ),
mForceClear( FALSE ),
sem_wait( &mEventThreadSemaphore );
}
- Integration::RenderSurface* currentSurface = mAdaptorInterfaces.GetRenderSurfaceInterface();
+ Dali::RenderSurfaceInterface* currentSurface = mAdaptorInterfaces.GetRenderSurfaceInterface();
if( currentSurface )
{
currentSurface->StartRender();
LOG_EVENT_TRACE;
// Stop Rendering and the Update/Render Thread
- Integration::RenderSurface* currentSurface = mAdaptorInterfaces.GetRenderSurfaceInterface();
+ Dali::RenderSurfaceInterface* currentSurface = mAdaptorInterfaces.GetRenderSurfaceInterface();
if( currentSurface )
{
currentSurface->StopRender();
}
}
-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;
// REPLACE SURFACE
//////////////////////////////
- Integration::RenderSurface* newSurface = ShouldSurfaceBeReplaced();
+ Dali::RenderSurfaceInterface* newSurface = ShouldSurfaceBeReplaced();
if( DALI_UNLIKELY( newSurface ) )
{
LOG_UPDATE_RENDER_TRACE_FMT( "Replacing Surface" );
}
// Check resize
+ bool surfaceResized = false;
bool shouldSurfaceBeResized = ShouldSurfaceBeResized();
if( DALI_UNLIKELY( shouldSurfaceBeResized ) )
{
{
LOG_UPDATE_RENDER_TRACE_FMT( "Resizing Surface" );
SurfaceResized();
+ surfaceResized = true;
}
}
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;
( 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
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;
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;
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 );
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 );
*/
virtual void ReplaceSurface( Dali::RenderSurfaceInterface* surface );
- /**
- * @copydoc ThreadControllerInterface::DeleteSurface()
- */
- virtual void DeleteSurface( Dali::RenderSurfaceInterface* surface );
-
/**
* @copydoc ThreadControllerInterface::ResizeSurface()
*/
*
* @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.
*/
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.
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).
*/
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.
*/
/*
- * 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.
}
}
-void EglContextHelperImplementation::MakeContextCurrent( Integration::RenderSurface* surface )
-{
- if ( mEglImplementation && surface )
- {
- surface->MakeContextCurrent();
- }
-}
-
void EglContextHelperImplementation::MakeContextNull()
{
if ( mEglImplementation )
#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.
*/
virtual void MakeSurfacelessContextCurrent() override;
- /**
- * @copydoc Dali::Integration::GlContextHelperAbstraction::MakeContextCurrent()
- */
- virtual void MakeContextCurrent( Integration::RenderSurface* surface ) override;
-
/**
* @copydoc Dali::Integration::GlContextHelperAbstraction::MakeContextNull()
*/
/*
- * 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.
// INTERNAL INCLUDES
#include <dali/devel-api/adaptor-framework/bitmap-saver.h>
-#include <dali/integration-api/render-surface.h>
+#include <dali/integration-api/adaptor-framework/render-surface-interface.h>
#include <dali/internal/graphics/common/egl-image-extensions.h>
#include <dali/internal/graphics/gles/egl-graphics.h>
#include <dali/internal/adaptor/common/adaptor-impl.h>
/*
- * 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.
#include <dali/internal/graphics/common/egl-image-extensions.h>
#include <dali/internal/graphics/gles/egl-graphics.h>
#include <dali/internal/adaptor/common/adaptor-impl.h>
-#include <dali/integration-api/render-surface.h>
+#include <dali/integration-api/adaptor-framework/render-surface-interface.h>
// Allow this to be encoded and saved:
#include <dali/devel-api/adaptor-framework/bitmap-saver.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.
#include <dali/internal/graphics/gles/egl-graphics.h>
#include <dali/internal/adaptor/common/adaptor-impl.h>
#include <dali/devel-api/adaptor-framework/bitmap-saver.h>
-#include <dali/integration-api/render-surface.h>
-
+#include <dali/integration-api/adaptor-framework/render-surface-interface.h>
namespace Dali
{
/*
- * 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.
#include <dali/internal/adaptor/common/adaptor-impl.h>
#include <dali/internal/window-system/windows/platform-implement-win.h>
#include <dali/devel-api/adaptor-framework/bitmap-saver.h>
-#include <dali/integration-api/render-surface.h>
+#include <dali/integration-api/adaptor-framework/render-surface-interface.h>
namespace Dali
{
mThreadControllerInterface->ReplaceSurface( newSurface );
}
-void ThreadController::DeleteSurface( Dali::RenderSurfaceInterface* surface )
-{
- mThreadControllerInterface->DeleteSurface( surface );
-}
-
void ThreadController::ResizeSurface()
{
mThreadControllerInterface->ResizeSurface();
*/
void ReplaceSurface( Dali::RenderSurfaceInterface* surface );
- /**
- * Deletes the surface.
- * @param surface The surface to be deleted
- */
- void DeleteSurface( Dali::RenderSurfaceInterface* surface );
-
/**
* Resize the surface.
*/
/*
- * 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.
DisplayConnectionAndroid::DisplayConnectionAndroid()
: mDisplay( NULL ),
- mSurfaceType( Integration::RenderSurface::WINDOW_RENDER_SURFACE ),
+ mSurfaceType( RenderSurfaceInterface::WINDOW_RENDER_SURFACE ),
mGraphics( nullptr )
{
}
return true;
}
-void DisplayConnectionAndroid::SetSurfaceType( Integration::RenderSurface::Type type )
+void DisplayConnectionAndroid::SetSurfaceType( Dali::RenderSurfaceInterface::Type type )
{
mSurfaceType = type;
mDisplay = EGL_DEFAULT_DISPLAY;
#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.
* @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
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
};
#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.
* 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
/*
- * 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.
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();
#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.
#include <dali/public-api/object/any.h>
// INTERNAL INCLUDES
-#include <dali/integration-api/render-surface.h>
+#include <dali/integration-api/adaptor-framework/render-surface-interface.h>
#include <dali/internal/graphics/common/graphics-interface.h>
* @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().
#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.
virtual void SetRenderNotification( TriggerEventInterface* renderNotification ) = 0;
/**
- * @copydoc Dali::Integration::RenderSurface::GetDepthBufferRequired()
+ * @copydoc Dali::RenderSurfaceInterface::GetDepthBufferRequired()
*/
Integration::DepthBufferAvailable GetDepthBufferRequired() override
{
}
/**
- * @copydoc Dali::Integration::RenderSurface::GetStencilBufferRequired()
+ * @copydoc Dali::RenderSurfaceInterface::GetStencilBufferRequired()
*/
Integration::StencilBufferAvailable GetStencilBufferRequired() override
{
#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.
*/
// INTERNAL INCLUDES
-#include <dali/integration-api/render-surface.h>
+#include <dali/integration-api/adaptor-framework/render-surface-interface.h>
// EXTERNAL INCLUDES
#include <dali/public-api/object/any.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.
// 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()
#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.
*/
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;
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;
/*
- * 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.
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();
}
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();
}
#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.
* @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
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
};
/*
- * 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.
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()
#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.
*/
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;
/*
- * 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.
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);
#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.
/**
* @copydoc Dali::Internal::Adaptor::DisplayConnection::SetSurfaceType
*/
- void SetSurfaceType( Integration::RenderSurface::Type type );
+ void SetSurfaceType( Dali::RenderSurfaceInterface::Type type );
/**
* @copydoc Dali::Internal::Adaptor::DisplayConnection::SetGraphicsInterface
/*
- * 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.
}
}
-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()
#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.
*/
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;
/*\r
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.\r
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.\r
*\r
* Licensed under the Apache License, Version 2.0 (the "License");\r
* you may not use this file except in compliance with the License.\r
return true;\r
}\r
\r
-void DisplayConnectionWin::SetSurfaceType( Dali::Integration::RenderSurface::Type type )\r
+void DisplayConnectionWin::SetSurfaceType( Dali::RenderSurfaceInterface::Type type )\r
{\r
- if( type == Dali::Integration::RenderSurface::WINDOW_RENDER_SURFACE )\r
+ if( type == Dali::RenderSurfaceInterface::WINDOW_RENDER_SURFACE )\r
{\r
mDisplay = GetDC( GetForegroundWindow() );\r
}\r
#define DALI_INTERNAL_WIN_DIPLAY_CONNECTION_H\r
\r
/*\r
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.\r
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.\r
*\r
* Licensed under the Apache License, Version 2.0 (the "License");\r
* you may not use this file except in compliance with the License.\r
/**\r
* @copydoc Dali::Internal::Adaptor::DisplayConnection::SetSurfaceType\r
*/\r
- void SetSurfaceType( Dali::Integration::RenderSurface::Type type );\r
+ void SetSurfaceType( Dali::RenderSurfaceInterface::Type type );\r
\r
/**\r
* @copydoc Dali::Internal::Adaptor::DisplayConnection::SetGraphicsInterface\r