You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by cf...@apache.org on 2012/10/30 20:26:09 UTC
svn commit: r1403828 -
/incubator/flex/sdk/branches/develop/frameworks/projects/spark/src/spark/primitives/BitmapImage.as
Author: cframpton
Date: Tue Oct 30 19:26:08 2012
New Revision: 1403828
URL: http://svn.apache.org/viewvc?rev=1403828&view=rev
Log:
Return a copy because when the source of the data changes we destroy the bitmap. If a developer is holding a reference to the actual bitmap they will have an invalid reference.
Modified:
incubator/flex/sdk/branches/develop/frameworks/projects/spark/src/spark/primitives/BitmapImage.as
Modified: incubator/flex/sdk/branches/develop/frameworks/projects/spark/src/spark/primitives/BitmapImage.as
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/frameworks/projects/spark/src/spark/primitives/BitmapImage.as?rev=1403828&r1=1403827&r2=1403828&view=diff
==============================================================================
--- incubator/flex/sdk/branches/develop/frameworks/projects/spark/src/spark/primitives/BitmapImage.as (original)
+++ incubator/flex/sdk/branches/develop/frameworks/projects/spark/src/spark/primitives/BitmapImage.as Tue Oct 30 19:26:08 2012
@@ -242,6 +242,8 @@ public class BitmapImage extends Graphic
*/
public function get bitmapData():BitmapData
{
+ //We return a copy because when the source of the data changes we destroy the bitmap
+ //If a developer is holding a reference to the actual bitmap they will have an invalid reference
return _bitmapData ? _bitmapData.clone() : _bitmapData;
}