From: Heeyong Song Date: Tue, 12 Nov 2019 06:15:50 +0000 (+0900) Subject: Revert "[Tizen] Implement partial update" X-Git-Tag: accepted/tizen/unified/20191113.123451~12 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git;a=commitdiff_plain;h=9a6948bdf0235125dea3df0ecf2bbd035a76f3c9 Revert "[Tizen] Implement partial update" This reverts commit db79997004ac2fef8c6c958d5aae6e10adb1258a. Change-Id: Iaf105920bc9a159570946d0515ffcbae4966ef23 --- 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 old mode 100755 new mode 100644 index 34566e6..44b4964 --- 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 @@ -63,8 +63,7 @@ void TestApplication::CreateCore() mDataRetentionPolicy, Integration::RenderToFrameBuffer::FALSE, Integration::DepthBufferAvailable::TRUE, - Integration::StencilBufferAvailable::TRUE, - Integration::PartialUpdateAvailable::FALSE ); + Integration::StencilBufferAvailable::TRUE ); mCore->ContextCreated(); 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 old mode 100755 new mode 100644 index 37e1b3a..066b37e --- 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 @@ -117,13 +117,4 @@ Vector4 TestRenderSurface::GetBackgroundColor() return mBackgroundColor; } -void TestRenderSurface::SetDamagedRect( const Dali::DamagedRect& damagedRectArray, Dali::DamagedRect& mergedRectArray ) -{ -} - -int32_t TestRenderSurface::GetBufferAge() -{ - return 0; -} - } // 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 old mode 100755 new mode 100644 index c15d9eb..be38d00 --- 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 @@ -137,16 +137,6 @@ public: */ virtual Vector4 GetBackgroundColor(); - /** - * @copydoc Dali::Integration::RenderSurface::SetDamagedRect - */ - virtual void SetDamagedRect( const Dali::DamagedRect& damagedRectArray, Dali::DamagedRect& mergedRectArray ); - - /** - * @copydoc Dali::Integration::RenderSurface::GetBufferAge - */ - virtual int32_t GetBufferAge(); - private: /** diff --git a/dali/integration-api/render-surface-interface.h b/dali/integration-api/render-surface-interface.h old mode 100755 new mode 100644 index 3b93431..3fc746c --- a/dali/integration-api/render-surface-interface.h +++ b/dali/integration-api/render-surface-interface.h @@ -181,18 +181,6 @@ public: */ virtual Integration::StencilBufferAvailable GetStencilBufferRequired() = 0; - /** - * @brief Sets currentframe damaged rects - * @param[in] Sets currentframe damaged rects - * @param[out] return merged rect - */ - virtual void SetDamagedRect( const Dali::DamagedRect& damagedRect, Dali::DamagedRect& mergedRectArray ) = 0; - - /** - * @brief Gets buffer age - */ - virtual int32_t GetBufferAge() = 0; - public: void SetAdaptor( Dali::Internal::Adaptor::AdaptorInternalServices& adaptor ) diff --git a/dali/internal/adaptor/common/adaptor-impl.cpp b/dali/internal/adaptor/common/adaptor-impl.cpp index 1fc3f4e..50d63ec 100755 --- a/dali/internal/adaptor/common/adaptor-impl.cpp +++ b/dali/internal/adaptor/common/adaptor-impl.cpp @@ -185,8 +185,7 @@ void Adaptor::Initialize( GraphicsFactory& graphicsFactory, Dali::Configuration: dataRetentionPolicy , ( 0u != mEnvironmentOptions->GetRenderToFboInterval() ) ? Integration::RenderToFrameBuffer::TRUE : Integration::RenderToFrameBuffer::FALSE, mGraphics->GetDepthBufferRequired(), - mGraphics->GetStencilBufferRequired(), - mGraphics->PartialUpdateAvailable() ); + mGraphics->GetStencilBufferRequired() ); defaultWindow->SetAdaptor( Get() ); diff --git a/dali/internal/graphics/common/graphics-interface.h b/dali/internal/graphics/common/graphics-interface.h old mode 100755 new mode 100644 index 9b5d4cf..5e80ef7 --- a/dali/internal/graphics/common/graphics-interface.h +++ b/dali/internal/graphics/common/graphics-interface.h @@ -43,8 +43,7 @@ public: */ GraphicsInterface() : mDepthBufferRequired( Integration::DepthBufferAvailable::FALSE ), - mStencilBufferRequired( Integration::StencilBufferAvailable::FALSE ), - mPartialUpdateAvailable( Integration::PartialUpdateAvailable::FALSE ) + mStencilBufferRequired( Integration::StencilBufferAvailable::FALSE ) { }; @@ -77,15 +76,6 @@ public: return mStencilBufferRequired; }; - /** - * Get whether the partial update is available - * @return TRUE if the partial update is available - */ - Integration::PartialUpdateAvailable PartialUpdateAvailable() - { - return mPartialUpdateAvailable; - }; - protected: /** * Virtual protected destructor - no deletion through this interface @@ -97,7 +87,6 @@ protected: Integration::DepthBufferAvailable mDepthBufferRequired; ///< Whether the depth buffer is required Integration::StencilBufferAvailable mStencilBufferRequired; ///< Whether the stencil buffer is required - Integration::PartialUpdateAvailable mPartialUpdateAvailable; ///Whether the partial update is available }; } // Adaptor diff --git a/dali/internal/graphics/gles/egl-graphics.cpp b/dali/internal/graphics/gles/egl-graphics.cpp old mode 100755 new mode 100644 index 2ce631e..406e69c --- a/dali/internal/graphics/gles/egl-graphics.cpp +++ b/dali/internal/graphics/gles/egl-graphics.cpp @@ -62,7 +62,6 @@ void EglGraphics::Initialize( EnvironmentOptions* environmentOptions ) mDepthBufferRequired = static_cast< Integration::DepthBufferAvailable >( environmentOptions->DepthBufferRequired() ); mStencilBufferRequired = static_cast< Integration::StencilBufferAvailable >( environmentOptions->StencilBufferRequired() ); - mPartialUpdateAvailable = static_cast< Integration::PartialUpdateAvailable >( environmentOptions->PartialUpdateAvailable() ); mMultiSamplingLevel = environmentOptions->GetMultiSamplingLevel(); @@ -73,7 +72,7 @@ void EglGraphics::Initialize( EnvironmentOptions* environmentOptions ) EglInterface* EglGraphics::Create() { - mEglImplementation = Utils::MakeUnique< EglImplementation >( mMultiSamplingLevel, mDepthBufferRequired, mStencilBufferRequired, mPartialUpdateAvailable ); + mEglImplementation = Utils::MakeUnique< EglImplementation >( mMultiSamplingLevel, mDepthBufferRequired, mStencilBufferRequired ); mEglImageExtensions = Utils::MakeUnique< EglImageExtensions >( mEglImplementation.get() ); mEglSync->Initialize( mEglImplementation.get() ); // The sync impl needs the EglDisplay diff --git a/dali/internal/graphics/gles/egl-implementation.cpp b/dali/internal/graphics/gles/egl-implementation.cpp index d672c01..2d898f9 100755 --- a/dali/internal/graphics/gles/egl-implementation.cpp +++ b/dali/internal/graphics/gles/egl-implementation.cpp @@ -36,10 +36,9 @@ namespace { const uint32_t THRESHOLD_SWAPBUFFER_COUNT = 5; - const uint32_t CHECK_EXTENSION_NUMBER = 3; + const uint32_t CHECK_EXTENSION_NUMBER = 2; const std::string EGL_KHR_SURFACELESS_CONTEXT = "EGL_KHR_surfaceless_context"; const std::string EGL_KHR_CREATE_CONTEXT = "EGL_KHR_create_context"; - const std::string EGL_KHR_PARTIAL_UPDATE = "EGL_KHR_partial_update"; } namespace Dali @@ -64,8 +63,7 @@ namespace Adaptor EglImplementation::EglImplementation( int multiSamplingLevel, Integration::DepthBufferAvailable depthBufferRequired, - Integration::StencilBufferAvailable stencilBufferRequired, - Integration::PartialUpdateAvailable partialUpdateAvailable ) + Integration::StencilBufferAvailable stencilBufferRequired ) : mContextAttribs(), mEglNativeDisplay( 0 ), mEglNativeWindow( 0 ), @@ -77,7 +75,6 @@ EglImplementation::EglImplementation( int multiSamplingLevel, mCurrentEglContext( EGL_NO_CONTEXT ), mMultiSamplingLevel( multiSamplingLevel ), mGlesVersion( 30 ), - mDamagedRectArray( 0 ), mColorDepth( COLOR_DEPTH_24 ), mGlesInitialized( false ), mIsOwnSurface( true ), @@ -86,26 +83,8 @@ EglImplementation::EglImplementation( int multiSamplingLevel, mStencilBufferRequired( stencilBufferRequired == Integration::StencilBufferAvailable::TRUE ), mIsSurfacelessContextSupported( false ), mIsKhrCreateContextSupported( false ), - mSwapBufferCountAfterResume( 0 ), - mIsKhrPartialUpdateSupported( false ), - mPartialUpdateAvailable( partialUpdateAvailable == Integration::PartialUpdateAvailable::TRUE ), - mEglSetDamageRegionKHR( nullptr ), - mSwapBuffersWithDamage( nullptr ) + mSwapBufferCountAfterResume( 0 ) { - if( mPartialUpdateAvailable ) - { - mEglSetDamageRegionKHR = reinterpret_cast< PFNEGLSETDAMAGEREGIONKHRPROC >( eglGetProcAddress( "eglSetDamageRegionKHR" ) ); - mSwapBuffersWithDamage = reinterpret_cast< PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC >( eglGetProcAddress( "eglSwapBuffersWithDamageEXT" ) ); - if( !mEglSetDamageRegionKHR || !mSwapBuffersWithDamage ) - { - mPartialUpdateAvailable = false; - DALI_LOG_ERROR("Initialization of partial update failed.\n"); - } - else - { - DALI_LOG_RELEASE_INFO("Initialization of partial update success!\n"); - } - } } EglImplementation::~EglImplementation() @@ -157,16 +136,6 @@ bool EglImplementation::InitializeGles( EGLNativeDisplayType display, bool isOwn mIsKhrCreateContextSupported = true; extensionCheckCount++; } - if( currentExtension == EGL_KHR_PARTIAL_UPDATE ) - { - mIsKhrPartialUpdateSupported = true; - extensionCheckCount++; - } - } - - if( !mIsKhrPartialUpdateSupported ) - { - mPartialUpdateAvailable = false; } // We want to display this information all the time, so use the LogMessage directly @@ -339,31 +308,6 @@ bool EglImplementation::IsGlesInitialized() const return mGlesInitialized; } - -const char* GetEglErrorString(EGLint error) -{ - switch(error) - { - case EGL_SUCCESS: return "No error"; - case EGL_NOT_INITIALIZED: return "EGL not initialized or failed to initialize"; - case EGL_BAD_ACCESS: return "Resource inaccessible"; - case EGL_BAD_ALLOC: return "Cannot allocate resources"; - case EGL_BAD_ATTRIBUTE: return "Unrecognized attribute or attribute value"; - case EGL_BAD_CONTEXT: return "Invalid EGL context"; - case EGL_BAD_CONFIG: return "Invalid EGL frame buffer configuration"; - case EGL_BAD_CURRENT_SURFACE: return "Current surface is no longer valid"; - case EGL_BAD_DISPLAY: return "Invalid EGL display"; - case EGL_BAD_SURFACE: return "Invalid surface"; - case EGL_BAD_MATCH: return "Inconsistent arguments"; - case EGL_BAD_PARAMETER: return "Invalid argument"; - case EGL_BAD_NATIVE_PIXMAP: return "Invalid native pixmap"; - case EGL_BAD_NATIVE_WINDOW: return "Invalid native window"; - case EGL_CONTEXT_LOST: return "Context lost"; - } - return "Unknown error "; -} - - void EglImplementation::SwapBuffers( EGLSurface& eglSurface ) { if ( eglSurface != EGL_NO_SURFACE ) // skip if using surfaceless context @@ -375,14 +319,7 @@ void EglImplementation::SwapBuffers( EGLSurface& eglSurface ) } #endif //DALI_PROFILE_UBUNTU - if( mPartialUpdateAvailable && mSwapBuffersWithDamage ) - { - mSwapBuffersWithDamage( mEglDisplay, eglSurface, &mDamagedRectArray[0], mDamagedRectArray.size()/4 ); - } - else - { - eglSwapBuffers( mEglDisplay, eglSurface ); - } + eglSwapBuffers( mEglDisplay, eglSurface ); #ifndef DALI_PROFILE_UBUNTU if( mSwapBufferCountAfterResume < THRESHOLD_SWAPBUFFER_COUNT ) @@ -391,33 +328,6 @@ void EglImplementation::SwapBuffers( EGLSurface& eglSurface ) mSwapBufferCountAfterResume++; } #endif //DALI_PROFILE_UBUNTU - - } -} - - -int EglImplementation::GetBufferAge( EGLSurface& eglSurface ) -{ - int bufferAge = 0; - if ( eglSurface != EGL_NO_SURFACE && mIsKhrPartialUpdateSupported ) - { - if( !eglQuerySurface(mEglDisplay, eglSurface, EGL_BUFFER_AGE_KHR, &bufferAge) ) - { - DALI_LOG_ERROR("EglImplementation::GetBufferAge() eglQuerySurface %s ", GetEglErrorString(eglGetError()) ); - } - } - return bufferAge; -} - -void EglImplementation::SetDamagedRect( std::vector damagedRectArray, EGLSurface& eglSurface ) -{ - mDamagedRectArray = damagedRectArray; - if ( eglSurface != EGL_NO_SURFACE && mPartialUpdateAvailable && mEglSetDamageRegionKHR ) - { - if( !mEglSetDamageRegionKHR( mEglDisplay, eglSurface, &damagedRectArray[0], damagedRectArray.size() / 4 ) ) - { - DALI_LOG_ERROR("EglImplementation::mEglSetDamageRegionKHR() error %s ", GetEglErrorString(eglGetError()) ); - } } } diff --git a/dali/internal/graphics/gles/egl-implementation.h b/dali/internal/graphics/gles/egl-implementation.h old mode 100755 new mode 100644 index 712effb..3f01537 --- a/dali/internal/graphics/gles/egl-implementation.h +++ b/dali/internal/graphics/gles/egl-implementation.h @@ -48,12 +48,10 @@ public: * @param[in] multiSamplingLevel The Multi-sampling level required * @param[in] depthBufferRequired Whether the depth buffer is required * @param[in] stencilBufferRequired Whether the stencil buffer is required - * @param[in] partialUpdateAvailable Whether the partial update is available */ EglImplementation( int multiSamplingLevel, Integration::DepthBufferAvailable depthBufferRequired, - Integration::StencilBufferAvailable stencilBufferRequired, - Integration::PartialUpdateAvailable partialUpdateAvailable ); + Integration::StencilBufferAvailable stencilBufferRequired ); /** * Destructor @@ -127,16 +125,6 @@ public: */ virtual void SwapBuffers( EGLSurface& eglSurface ); - /** - * Get current buffer age - */ - virtual int GetBufferAge( EGLSurface& eglSurface ); - - /** - * Set Damaged rect for Partial update - */ - virtual void SetDamagedRect( std::vector damagedRectArray, EGLSurface& eglSurface ); - /** * Performs an OpenGL copy buffers command */ @@ -252,7 +240,6 @@ private: int32_t mMultiSamplingLevel; int32_t mGlesVersion; - std::vector mDamagedRectArray; ColorDepth mColorDepth; @@ -263,12 +250,8 @@ private: bool mStencilBufferRequired; bool mIsSurfacelessContextSupported; bool mIsKhrCreateContextSupported; - uint32_t mSwapBufferCountAfterResume; - bool mIsKhrPartialUpdateSupported; - bool mPartialUpdateAvailable; - PFNEGLSETDAMAGEREGIONKHRPROC mEglSetDamageRegionKHR; - PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC mSwapBuffersWithDamage; + uint32_t mSwapBufferCountAfterResume; }; } // namespace Adaptor diff --git a/dali/internal/system/common/environment-options.cpp b/dali/internal/system/common/environment-options.cpp old mode 100755 new mode 100644 index d6d54cd..23bec81 --- a/dali/internal/system/common/environment-options.cpp +++ b/dali/internal/system/common/environment-options.cpp @@ -125,8 +125,7 @@ EnvironmentOptions::EnvironmentOptions() mThreadingMode( ThreadingMode::COMBINED_UPDATE_RENDER ), mGlesCallAccumulate( false ), mDepthBufferRequired( DEFAULT_DEPTH_BUFFER_REQUIRED_SETTING ), - mStencilBufferRequired( DEFAULT_STENCIL_BUFFER_REQUIRED_SETTING ), - mPartialUpdateAvailable( false ) + mStencilBufferRequired( DEFAULT_STENCIL_BUFFER_REQUIRED_SETTING ) { ParseEnvironmentOptions(); } @@ -362,11 +361,6 @@ bool EnvironmentOptions::StencilBufferRequired() const return mStencilBufferRequired; } -bool EnvironmentOptions::PartialUpdateAvailable() const -{ - return mPartialUpdateAvailable; -} - void EnvironmentOptions::ParseEnvironmentOptions() { // get logging options @@ -606,15 +600,6 @@ void EnvironmentOptions::ParseEnvironmentOptions() mStencilBufferRequired = false; } } - - int partialUpdateRequired( -1 ); - if( GetIntegerEnvironmentVariable( DALI_ENV_PARTIAL_UPDATE_AVAILABLE, partialUpdateRequired ) ) - { - if( partialUpdateRequired > 0 ) - { - mPartialUpdateAvailable = true; - } - } } } // Adaptor diff --git a/dali/internal/system/common/environment-options.h b/dali/internal/system/common/environment-options.h old mode 100755 new mode 100644 index 3fe351b..253ea7e --- a/dali/internal/system/common/environment-options.h +++ b/dali/internal/system/common/environment-options.h @@ -291,11 +291,6 @@ public: */ bool StencilBufferRequired() const; - /** - * @return whether the partial update is available. - */ - bool PartialUpdateAvailable() const; - /// Deleted copy constructor. EnvironmentOptions( const EnvironmentOptions& ) = delete; @@ -358,7 +353,6 @@ private: // Data bool mGlesCallAccumulate; ///< Whether or not to accumulate gles call statistics bool mDepthBufferRequired; ///< Whether the depth buffer is required bool mStencilBufferRequired; ///< Whether the stencil buffer is required - bool mPartialUpdateAvailable; ///< whether the partial update is available std::unique_ptr mTraceManager; ///< TraceManager }; diff --git a/dali/internal/system/common/environment-variables.h b/dali/internal/system/common/environment-variables.h old mode 100755 new mode 100644 index 6c790de..3d63c00 --- a/dali/internal/system/common/environment-variables.h +++ b/dali/internal/system/common/environment-variables.h @@ -122,8 +122,6 @@ namespace Adaptor #define DALI_ENV_DPI_VERTICAL "DALI_DPI_VERTICAL" -#define DALI_ENV_PARTIAL_UPDATE_AVAILABLE "DALI_PARTIAL_UPDATE_AVAILABLE" - } // namespace Adaptor } // namespace Internal diff --git a/dali/internal/window-system/common/window-render-surface.cpp b/dali/internal/window-system/common/window-render-surface.cpp old mode 100755 new mode 100644 index 0ac8bf3..f52c599 --- a/dali/internal/window-system/common/window-render-surface.cpp +++ b/dali/internal/window-system/common/window-render-surface.cpp @@ -46,7 +46,6 @@ namespace { const int MINIMUM_DIMENSION_CHANGE( 1 ); ///< Minimum change for window to be considered to have moved -const int TILE_SIZE = 16u; ///< Unit of tile size at GPU driver #if defined(DEBUG_ENABLED) Debug::Filter* gWindowRenderSurfaceLogFilter = Debug::Filter::New(Debug::Verbose, false, "LOG_WINDOW_RENDER_SURFACE"); @@ -69,16 +68,13 @@ WindowRenderSurface::WindowRenderSurface( Dali::PositionSize positionSize, Any s mOutputTransformedSignal(), mRotationAngle( 0 ), mScreenRotationAngle( 0 ), - mBufferAge( 0 ), - mPreBufferAge( 0 ), mOwnSurface( false ), mRotationSupported( false ), mRotationFinished( true ), mScreenRotationFinished( true ), mResizeFinished( true ), mDpiHorizontal( 0 ), - mDpiVertical( 0 ), - mPreDamagedRect() + mDpiVertical( 0 ) { DALI_LOG_INFO( gWindowRenderSurfaceLogFilter, Debug::Verbose, "Creating Window\n" ); Initialize( surface ); @@ -413,92 +409,6 @@ bool WindowRenderSurface::PreRender( bool resizingSurface ) return true; } -std::vector WindowRenderSurface::MergeRect( const Rect& damagedRect, int bufferAge ) -{ - std::vector mergedRectArray; - // merge bounding - int dx1 = mPositionSize.width, dx2 = 0, dy1 = mPositionSize.height, dy2 = 0; - int checkWidth = mPositionSize.width - TILE_SIZE; - int checkHeight = mPositionSize.height - TILE_SIZE; - - dx1 = std::min( damagedRect.x, dx1 ); - dx2 = std::max( damagedRect.x + damagedRect.width, dx2); - dy1 = std::min( damagedRect.y, dy1 ); - dy2 = std::max( damagedRect.y + damagedRect.height, dy2 ); - - for( int j = 0; j <= bufferAge; j++ ) - { - if( !mPreDamagedRect[j].IsEmpty() ) - { - dx1 = std::min( mPreDamagedRect[j].x, dx1 ); - dx2 = std::max( mPreDamagedRect[j].x + mPreDamagedRect[j].width, dx2); - dy1 = std::min( mPreDamagedRect[j].y, dy1 ); - dy2 = std::max( mPreDamagedRect[j].y + mPreDamagedRect[j].height, dy2 ); - - if( dx1 < TILE_SIZE && dx2 > checkWidth && dy1 < TILE_SIZE && dy2 > checkHeight ) - { - dx1 = 0, dx2 = mPositionSize.width, dy1 = 0, dy2 = mPositionSize.height; - break; - } - } - } - - dx1 = TILE_SIZE * (dx1 / TILE_SIZE); - dy1 = TILE_SIZE * (dy1 / TILE_SIZE); - dx2 = TILE_SIZE * ((dx2 + TILE_SIZE - 1) / TILE_SIZE); - dy2 = TILE_SIZE * ((dy2 + TILE_SIZE - 1) / TILE_SIZE); - - mergedRectArray.push_back( dx1 ); - mergedRectArray.push_back( dy1 ); - mergedRectArray.push_back( dx2 - dx1 ); - mergedRectArray.push_back( dy2 - dy1 ); - - return mergedRectArray; -} - - -void WindowRenderSurface::SetDamagedRect( const Dali::DamagedRect& damagedRect, Dali::DamagedRect& mergedRect ) -{ - auto eglGraphics = static_cast( mGraphics ); - std::vector rectArray; - if( eglGraphics ) - { - Internal::Adaptor::EglImplementation& eglImpl = eglGraphics->GetEglImplementation(); - - rectArray = MergeRect( damagedRect, mBufferAge ); - - mPreDamagedRect[4] = std::move( mPreDamagedRect[3] ); - mPreDamagedRect[3] = std::move( mPreDamagedRect[2] ); - mPreDamagedRect[2] = std::move( mPreDamagedRect[1] ); - mPreDamagedRect[1] = std::move( mPreDamagedRect[0] ); - mPreDamagedRect[0] = std::move( damagedRect ); - - eglImpl.SetDamagedRect( rectArray, mEGLSurface ); - } - - if( !rectArray.empty() ) - { - mergedRect.x = rectArray[0]; - mergedRect.y = rectArray[1]; - mergedRect.width = rectArray[2]; - mergedRect.height = rectArray[3]; - } -} - -int32_t WindowRenderSurface::GetBufferAge() -{ - int result = mBufferAge = 0; - auto eglGraphics = static_cast( mGraphics ); - if( eglGraphics ) - { - Internal::Adaptor::EglImplementation& eglImpl = eglGraphics->GetEglImplementation(); - mBufferAge = eglImpl.GetBufferAge( mEGLSurface );; - result = ( mBufferAge != mPreBufferAge ) ? 0 : mBufferAge; - mPreBufferAge = mBufferAge; - } - return result; -} - void WindowRenderSurface::PostRender( bool renderToFbo, bool replacingSurface, bool resizingSurface ) { // Inform the gl implementation that rendering has finished before informing the surface @@ -533,7 +443,6 @@ void WindowRenderSurface::PostRender( bool renderToFbo, bool replacingSurface, b } Internal::Adaptor::EglImplementation& eglImpl = eglGraphics->GetEglImplementation(); - eglImpl.SwapBuffers( mEGLSurface ); if( mRenderNotification ) diff --git a/dali/internal/window-system/common/window-render-surface.h b/dali/internal/window-system/common/window-render-surface.h old mode 100755 new mode 100644 index 194e1d9..2401a39 --- a/dali/internal/window-system/common/window-render-surface.h +++ b/dali/internal/window-system/common/window-render-surface.h @@ -210,16 +210,6 @@ public: // from Dali::Integration::RenderSurface */ virtual Integration::StencilBufferAvailable GetStencilBufferRequired() override; - /** - * @copydoc Dali::Integration::RenderSurface::SetDamagedRect() - */ - virtual void SetDamagedRect( const Dali::DamagedRect& damagedRect, Dali::DamagedRect& mergedRect ) override; - - /** - * @copydoc Dali::Integration::RenderSurface::GetBufferAge() - */ - virtual int32_t GetBufferAge() override; - private: /** @@ -237,11 +227,6 @@ private: */ void ProcessRotationRequest(); - /* - * @brief MergeRect - */ - std::vector MergeRect( const Rect& damagedRectArray, int bufferAge ); - protected: // Undefined @@ -266,8 +251,6 @@ private: // Data OutputSignalType mOutputTransformedSignal; int mRotationAngle; int mScreenRotationAngle; - int mBufferAge; - int mPreBufferAge; bool mOwnSurface; ///< Whether we own the surface (responsible for deleting it) bool mRotationSupported; bool mRotationFinished; @@ -277,7 +260,6 @@ private: // Data uint32_t mDpiHorizontal; uint32_t mDpiVertical; - Rect mPreDamagedRect[5]; ///< The GPU driver can has up to four buffers. And one is for area calculation. }; // class WindowRenderSurface } // namespace Adaptor 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 old mode 100755 new mode 100644 index 0997194..e69e8f1 --- 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 @@ -227,15 +227,6 @@ bool NativeRenderSurfaceEcoreWl::PreRender( bool ) return true; } -void NativeRenderSurfaceEcoreWl::SetDamagedRect( const Dali::DamagedRect& damagedRect, Dali::DamagedRect& mergedRect ) -{ -} - -int32_t NativeRenderSurfaceEcoreWl::GetBufferAge() -{ - return 0; -} - void NativeRenderSurfaceEcoreWl::PostRender( bool renderToFbo, bool replacingSurface, bool resizingSurface ) { auto eglGraphics = static_cast(mGraphics); 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 old mode 100755 new mode 100644 index c27bea4..00e7133 --- 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 @@ -159,18 +159,6 @@ public: // from Dali::Integration::RenderSurface */ virtual Integration::StencilBufferAvailable GetStencilBufferRequired() override; - /** - * @copydoc Dali::Integration::RenderSurface::SetDamagedRect() - */ - virtual void SetDamagedRect( const Dali::DamagedRect& damagedRect, Dali::DamagedRect& mergedRect ) override; - - /** - * @copydoc Dali::Integration::RenderSurface::GetBufferAge() - */ - virtual int32_t GetBufferAge() override; - - - private: /** 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 old mode 100755 new mode 100644 index 5ff47a6..41a44da --- 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 @@ -234,15 +234,6 @@ bool PixmapRenderSurfaceEcoreX::PreRender( bool ) return true; } -void PixmapRenderSurfaceEcoreX::SetDamagedRect( const Dali::DamagedRect& damagedRect, Dali::DamagedRect& mergedRect ) -{ -} - -int32_t PixmapRenderSurfaceEcoreX::GetBufferAge() -{ - return 0; -} - void PixmapRenderSurfaceEcoreX::PostRender( bool renderToFbo, bool replacingSurface, bool resizingSurface ) { auto eglGraphics = static_cast(mGraphics); 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 old mode 100755 new mode 100644 index 0c37ecb..c9d8da7 --- 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 @@ -170,16 +170,6 @@ private: // from PixmapRenderSurface */ virtual void UseExistingRenderable( unsigned int surfaceId ) override; - /** - * @copydoc Dali::Integration::RenderSurface::SetDamagedRect() - */ - virtual void SetDamagedRect( const Dali::DamagedRect& damagedRect, Dali::DamagedRect& mergedRect ) override; - - /** - * @copydoc Dali::Integration::RenderSurface::GetBufferAge() - */ - virtual int32_t GetBufferAge() override; - private: /**