flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cframp...@apache.org
Subject svn commit: r1403828 - /incubator/flex/sdk/branches/develop/frameworks/projects/spark/src/spark/primitives/BitmapImage.as
Date Tue, 30 Oct 2012 19:26:09 GMT
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;
     }
 



Mime
View raw message