INTEGRATION: CWS cairofixes01 (1.2.30); FILE MERGED

2006/03/02 17:50:01 radekdoulik 1.2.30.1: Issue number:  62722
Submitted by:  radekdoulik
Reviewed by:   radekdoulik
2006-02-08  Radek Doulik  <rodo@novell.com>

	* patches/cairo/cairo-canvas-redrawmanager-copy-updatearea.diff:
	avoid invalid reads when merging update areas. select2nd was
	making temporary copy, from which we took a reference and used it
	after the copy was destroyed
This commit is contained in:
Oliver Bolte
2006-03-22 10:01:20 +00:00
parent a7a09d627f
commit 59dfecfa2d
2 changed files with 8 additions and 6 deletions

View File

@@ -4,9 +4,9 @@
* *
* $RCSfile: spriteredrawmanager.hxx,v $ * $RCSfile: spriteredrawmanager.hxx,v $
* *
* $Revision: 1.2 $ * $Revision: 1.3 $
* *
* last change: $Author: kz $ $Date: 2005-11-02 12:41:12 $ * last change: $Author: obo $ $Date: 2006-03-22 10:58:22 $
* *
* The Contents of this file are made available subject to * The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1. * the terms of GNU Lesser General Public License Version 2.1.
@@ -97,6 +97,8 @@ namespace canvas
class SpriteInfo class SpriteInfo
{ {
public: public:
~SpriteInfo() {}
/** Create sprite info /** Create sprite info
@param rRef @param rRef
@@ -153,7 +155,7 @@ namespace canvas
} }
const Sprite::Reference& getSprite() const { return mpSprite; } const Sprite::Reference& getSprite() const { return mpSprite; }
const ::basegfx::B2DRange& getUpdateArea() const { return maTrueUpdateArea; } ::basegfx::B2DRange getUpdateArea() const { return maTrueUpdateArea; }
bool needsUpdate() const { return mbNeedsUpdate; } bool needsUpdate() const { return mbNeedsUpdate; }
bool isPureMove() const { return mbIsPureMove; } bool isPureMove() const { return mbIsPureMove; }

View File

@@ -4,9 +4,9 @@
* *
* $RCSfile: spriteredrawmanager.cxx,v $ * $RCSfile: spriteredrawmanager.cxx,v $
* *
* $Revision: 1.2 $ * $Revision: 1.3 $
* *
* last change: $Author: kz $ $Date: 2005-11-02 12:55:15 $ * last change: $Author: obo $ $Date: 2006-03-22 11:01:20 $
* *
* The Contents of this file are made available subject to * The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1. * the terms of GNU Lesser General Public License Version 2.1.
@@ -399,7 +399,7 @@ namespace canvas
// now, calc the _true_ update area, by merging all sprite's // now, calc the _true_ update area, by merging all sprite's
// true update areas into one rectangle // true update areas into one rectangle
::basegfx::B2DRange aTrueArea( aBegin->second.getUpdateArea() ); ::basegfx::B2DRange aTrueArea( aBegin->second.getUpdateArea() );
::std::for_each( ++rUpdateArea.maComponentList.begin(), ::std::for_each( aBegin,
aEnd, aEnd,
::boost::bind( ::basegfx::B2DRangeExpander(aTrueArea), ::boost::bind( ::basegfx::B2DRangeExpander(aTrueArea),
::boost::bind( &SpriteInfo::getUpdateArea, ::boost::bind( &SpriteInfo::getUpdateArea,