Permalink
Browse files

Merge pull request #3 from DmitriyYukhanov/master

memory exploding bug "fixed"
  • Loading branch information...
2 parents 0a219e9 + ce2548a commit 9c28b1ae42ba358a3b78106f7e8a4c039fa8fa59 @elsassph committed Mar 26, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/starling/extensions/ImageBatch.as
@@ -234,7 +234,11 @@ package starling.extensions
// color/alpha
cOffset = vOffset + 3;
- var k:Number = (premultipliedAlpha ? item.alpha : 1) / 255;
+
+ //var k:Number = (premultipliedAlpha ? item.alpha : 1) / 255; <- memory exploding! Oo
+ var k:Number = (premultipliedAlpha ? item.alpha : 1);
+ k /= 255;
+
data[cOffset] = data[int(cOffset + 9)] = data[int(cOffset + 18)] = data[int(cOffset + 27)]
= (item.color >> 16) * k;
++cOffset;

0 comments on commit 9c28b1a

Please sign in to comment.