summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Behrens <tbehrens@suse.com>2012-02-22 00:31:30 +0100
committerThorsten Behrens <tbehrens@suse.com>2012-02-22 11:14:06 +0100
commit2c7e061997202df9e602e209cf40c61606582e8e (patch)
treed46c1eeabbce0e8d68fff16b4ff097538564a044
parent1f6e33c7c349755820448f4bdfe0ce0eb4a039a6 (diff)
Fix fdo#45219 wrong transparency for animated objects.
With the attachement from said bug, and cairocanvas, sprites are displayed multiple times above each other (which, for semi- transparent sprites, lead to incorrect overall transparency)
-rw-r--r--canvas/inc/canvas/base/sprite.hxx2
-rw-r--r--canvas/inc/canvas/spriteredrawmanager.hxx2
-rw-r--r--canvas/source/tools/spriteredrawmanager.cxx5
3 files changed, 4 insertions, 5 deletions
diff --git a/canvas/inc/canvas/base/sprite.hxx b/canvas/inc/canvas/base/sprite.hxx
index bb3d655bb2e7..38a2270b8e5c 100644
--- a/canvas/inc/canvas/base/sprite.hxx
+++ b/canvas/inc/canvas/base/sprite.hxx
@@ -103,7 +103,7 @@ namespace canvas
/** Functor providing a StrictWeakOrdering for sprite references
*/
- struct SpriteComparator
+ struct SpriteWeakOrder
{
bool operator()( const Sprite::Reference& rLHS,
const Sprite::Reference& rRHS )
diff --git a/canvas/inc/canvas/spriteredrawmanager.hxx b/canvas/inc/canvas/spriteredrawmanager.hxx
index 3bf4ca666cff..9dc20995a850 100644
--- a/canvas/inc/canvas/spriteredrawmanager.hxx
+++ b/canvas/inc/canvas/spriteredrawmanager.hxx
@@ -361,7 +361,7 @@ namespace canvas
::std::sort( aSortedUpdateSprites.begin(),
aSortedUpdateSprites.end(),
- SpriteComparator() );
+ SpriteWeakOrder() );
if( isAreaUpdateOpaque( rUpdateArea,
nNumSprites ) )
diff --git a/canvas/source/tools/spriteredrawmanager.cxx b/canvas/source/tools/spriteredrawmanager.cxx
index 72976c1a70ca..eeb4714ff992 100644
--- a/canvas/source/tools/spriteredrawmanager.cxx
+++ b/canvas/source/tools/spriteredrawmanager.cxx
@@ -233,7 +233,7 @@ namespace canvas
// in line with the problem of having sprite state available
// for the frame before the last frame; plus, it avoids
// frequent locks of the object mutices
- SpriteComparator aSpriteComparator;
+ SpriteWeakOrder aSpriteComparator;
// put all sprites that have changed content into update areas
ListOfSprites::const_iterator aCurrSprite( maSprites.begin() );
@@ -277,8 +277,7 @@ namespace canvas
VectorOfSprites::iterator aEnd=
::std::unique( aUpdatableSprites.begin(),
- aUpdatableSprites.end(),
- aSpriteComparator );
+ aUpdatableSprites.end() );
// for each unique sprite, check the change event vector,
// calculate the update operation from that, and add the