From 16a53253e5991de8d44679157c29d58bb431eb2c Mon Sep 17 00:00:00 2001 From: tsahi glik Date: Fri, 30 Aug 2013 11:10:40 -0700 Subject: Sync IOS screen invalidate to end of paint Change-Id: If179c5280366a377ace710e4acf7df737544b224 Reviewed-on: https://gerrit.libreoffice.org/5706 Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist --- vcl/ios/iosinst.cxx | 19 +++++++++++++++++-- vcl/source/window/window.cxx | 1 + 2 files changed, 18 insertions(+), 2 deletions(-) (limited to 'vcl') diff --git a/vcl/ios/iosinst.cxx b/vcl/ios/iosinst.cxx index b316d34269ed..8b654a58003a 100644 --- a/vcl/ios/iosinst.cxx +++ b/vcl/ios/iosinst.cxx @@ -146,6 +146,9 @@ SalSystem *IosSalInstance::CreateSalSystem() class IosSalFrame : public SvpSalFrame { +private: + basegfx::B2IBox m_DamagedRect; + public: IosSalFrame( IosSalInstance *pInstance, SalFrame *pParent, @@ -176,7 +179,7 @@ public: if (rDamageRect.isEmpty()) return; - IosSalInstance::getInstance()->damaged( this, rDamageRect ); + m_DamagedRect.expand(rDamageRect); } virtual void UpdateSettings( AllSettings &rSettings ) @@ -199,6 +202,16 @@ public: rSettings.SetStyleSettings( aStyleSet ); } + + virtual void Flush() + { + IosSalInstance::getInstance()->damaged( this, m_DamagedRect ); + } + + void resetDamaged() + { + m_DamagedRect.reset(); + } }; SalFrame *IosSalInstance::CreateChildFrame( SystemParentData* pParent, sal_uLong nStyle ) @@ -322,7 +335,7 @@ IMPL_LINK( IosSalInstance, RenderWindows, RenderWindowsArg*, arg ) for( std::list< SalFrame* >::const_iterator it = getFrames().begin(); it != getFrames().end(); it++ ) { - SvpSalFrame *pFrame = static_cast(*it); + IosSalFrame *pFrame = static_cast(*it); SalFrameGeometry aGeom = pFrame->GetGeometry(); CGRect bbox = CGRectMake( aGeom.nX, aGeom.nY, aGeom.nWidth, aGeom.nHeight ); if ( pFrame->IsVisible() && @@ -344,6 +357,8 @@ IMPL_LINK( IosSalInstance, RenderWindows, RenderWindowsArg*, arg ) false, kCGRenderingIntentDefault ); CGContextDrawImage( arg->context, bbox, image ); + + pFrame->resetDamaged(); } } diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 669e0eb62f43..d027eaa9d365 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -7568,6 +7568,7 @@ void Window::Update() } pUpdateWindow->ImplCallPaint( NULL, pUpdateWindow->mpWindowImpl->mnPaintFlags ); + bFlush = sal_True; } if ( bFlush ) -- cgit