Kaydet (Commit) 16a53253 authored tarafından tsahi glik's avatar tsahi glik Kaydeden (comit) Tor Lillqvist

Sync IOS screen invalidate to end of paint

Change-Id: If179c5280366a377ace710e4acf7df737544b224
Reviewed-on: https://gerrit.libreoffice.org/5706Reviewed-by: 's avatarTor Lillqvist <tml@collabora.com>
Tested-by: 's avatarTor Lillqvist <tml@collabora.com>
üst 854c302e
...@@ -146,6 +146,9 @@ SalSystem *IosSalInstance::CreateSalSystem() ...@@ -146,6 +146,9 @@ SalSystem *IosSalInstance::CreateSalSystem()
class IosSalFrame : public SvpSalFrame class IosSalFrame : public SvpSalFrame
{ {
private:
basegfx::B2IBox m_DamagedRect;
public: public:
IosSalFrame( IosSalInstance *pInstance, IosSalFrame( IosSalInstance *pInstance,
SalFrame *pParent, SalFrame *pParent,
...@@ -176,7 +179,7 @@ public: ...@@ -176,7 +179,7 @@ public:
if (rDamageRect.isEmpty()) if (rDamageRect.isEmpty())
return; return;
IosSalInstance::getInstance()->damaged( this, rDamageRect ); m_DamagedRect.expand(rDamageRect);
} }
virtual void UpdateSettings( AllSettings &rSettings ) virtual void UpdateSettings( AllSettings &rSettings )
...@@ -199,6 +202,16 @@ public: ...@@ -199,6 +202,16 @@ public:
rSettings.SetStyleSettings( aStyleSet ); 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 ) SalFrame *IosSalInstance::CreateChildFrame( SystemParentData* pParent, sal_uLong nStyle )
...@@ -322,7 +335,7 @@ IMPL_LINK( IosSalInstance, RenderWindows, RenderWindowsArg*, arg ) ...@@ -322,7 +335,7 @@ IMPL_LINK( IosSalInstance, RenderWindows, RenderWindowsArg*, arg )
for( std::list< SalFrame* >::const_iterator it = getFrames().begin(); for( std::list< SalFrame* >::const_iterator it = getFrames().begin();
it != getFrames().end(); it != getFrames().end();
it++ ) { it++ ) {
SvpSalFrame *pFrame = static_cast<SvpSalFrame *>(*it); IosSalFrame *pFrame = static_cast<IosSalFrame *>(*it);
SalFrameGeometry aGeom = pFrame->GetGeometry(); SalFrameGeometry aGeom = pFrame->GetGeometry();
CGRect bbox = CGRectMake( aGeom.nX, aGeom.nY, aGeom.nWidth, aGeom.nHeight ); CGRect bbox = CGRectMake( aGeom.nX, aGeom.nY, aGeom.nWidth, aGeom.nHeight );
if ( pFrame->IsVisible() && if ( pFrame->IsVisible() &&
...@@ -344,6 +357,8 @@ IMPL_LINK( IosSalInstance, RenderWindows, RenderWindowsArg*, arg ) ...@@ -344,6 +357,8 @@ IMPL_LINK( IosSalInstance, RenderWindows, RenderWindowsArg*, arg )
false, false,
kCGRenderingIntentDefault ); kCGRenderingIntentDefault );
CGContextDrawImage( arg->context, bbox, image ); CGContextDrawImage( arg->context, bbox, image );
pFrame->resetDamaged();
} }
} }
......
...@@ -7568,6 +7568,7 @@ void Window::Update() ...@@ -7568,6 +7568,7 @@ void Window::Update()
} }
pUpdateWindow->ImplCallPaint( NULL, pUpdateWindow->mpWindowImpl->mnPaintFlags ); pUpdateWindow->ImplCallPaint( NULL, pUpdateWindow->mpWindowImpl->mnPaintFlags );
bFlush = sal_True;
} }
if ( bFlush ) if ( bFlush )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment