summaryrefslogtreecommitdiff
path: root/canvas/inc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-12-21 13:42:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-12-21 15:55:46 +0100
commit25298930bc86d1a449a7e5b139d65e49f695f8c1 (patch)
treeb3f28ef6b18b12347694a637b6785ecb5eedc1fe /canvas/inc
parent1edaee2f03bce0efa409c592919458658d0aa751 (diff)
loplugin:flatten in canvas..cui
Change-Id: I208767eaa60d913fe2882403f1f9351eb08256f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127224 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'canvas/inc')
-rw-r--r--canvas/inc/spriteredrawmanager.hxx96
1 files changed, 48 insertions, 48 deletions
diff --git a/canvas/inc/spriteredrawmanager.hxx b/canvas/inc/spriteredrawmanager.hxx
index 87c692f6d7dc..cf2b86e0a8cc 100644
--- a/canvas/inc/spriteredrawmanager.hxx
+++ b/canvas/inc/spriteredrawmanager.hxx
@@ -286,64 +286,64 @@ namespace canvas
{
// check whether this area contains changed sprites at all
// (if not, just ignore it)
- if( areSpritesChanged( rUpdateArea ) )
+ if( !areSpritesChanged( rUpdateArea ) )
+ return;
+
+ // at least one of the sprites actually needs an
+ // update - process whole area.
+
+ // check whether this area could be handled special
+ // (background paint, direct update, scroll, etc.)
+ ::basegfx::B2DRange aMoveStart;
+ ::basegfx::B2DRange aMoveEnd;
+ if( rUpdateArea.maComponentList.empty() )
+ {
+ rFunc.backgroundPaint( rUpdateArea.maTotalBounds );
+ }
+ else
{
- // at least one of the sprites actually needs an
- // update - process whole area.
-
- // check whether this area could be handled special
- // (background paint, direct update, scroll, etc.)
- ::basegfx::B2DRange aMoveStart;
- ::basegfx::B2DRange aMoveEnd;
- if( rUpdateArea.maComponentList.empty() )
+ // cache number of sprites in this area (it's a
+ // list, and both isAreaUpdateScroll() and
+ // isAreaUpdateOpaque() need it).
+ const ::std::size_t nNumSprites(
+ rUpdateArea.maComponentList.size() );
+
+ if( isAreaUpdateScroll( aMoveStart,
+ aMoveEnd,
+ rUpdateArea,
+ nNumSprites ) )
{
- rFunc.backgroundPaint( rUpdateArea.maTotalBounds );
+ rFunc.scrollUpdate( aMoveStart,
+ aMoveEnd,
+ rUpdateArea );
}
else
{
- // cache number of sprites in this area (it's a
- // list, and both isAreaUpdateScroll() and
- // isAreaUpdateOpaque() need it).
- const ::std::size_t nNumSprites(
- rUpdateArea.maComponentList.size() );
-
- if( isAreaUpdateScroll( aMoveStart,
- aMoveEnd,
- rUpdateArea,
+ // potentially, more than a single sprite
+ // involved. Have to sort component lists for
+ // sprite prio.
+ VectorOfSprites aSortedUpdateSprites;
+ for (auto const& elem : rUpdateArea.maComponentList)
+ {
+ const Sprite::Reference& rSprite( elem.second.getSprite() );
+ if( rSprite.is() )
+ aSortedUpdateSprites.push_back( rSprite );
+ }
+
+ ::std::sort( aSortedUpdateSprites.begin(),
+ aSortedUpdateSprites.end(),
+ SpriteWeakOrder() );
+
+ if( isAreaUpdateOpaque( rUpdateArea,
nNumSprites ) )
{
- rFunc.scrollUpdate( aMoveStart,
- aMoveEnd,
- rUpdateArea );
+ rFunc.opaqueUpdate( rUpdateArea.maTotalBounds,
+ aSortedUpdateSprites );
}
else
{
- // potentially, more than a single sprite
- // involved. Have to sort component lists for
- // sprite prio.
- VectorOfSprites aSortedUpdateSprites;
- for (auto const& elem : rUpdateArea.maComponentList)
- {
- const Sprite::Reference& rSprite( elem.second.getSprite() );
- if( rSprite.is() )
- aSortedUpdateSprites.push_back( rSprite );
- }
-
- ::std::sort( aSortedUpdateSprites.begin(),
- aSortedUpdateSprites.end(),
- SpriteWeakOrder() );
-
- if( isAreaUpdateOpaque( rUpdateArea,
- nNumSprites ) )
- {
- rFunc.opaqueUpdate( rUpdateArea.maTotalBounds,
- aSortedUpdateSprites );
- }
- else
- {
- rFunc.genericUpdate( rUpdateArea.maTotalBounds,
- aSortedUpdateSprites );
- }
+ rFunc.genericUpdate( rUpdateArea.maTotalBounds,
+ aSortedUpdateSprites );
}
}
}