Permalink
Browse files

Added work-around for the memory exploding bug in the ImageBatch.rend…

…er()!
  • Loading branch information...
1 parent 61961da commit ce2548a8737b1345aa181f1f349cc25924e02811 focus 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 ce2548a

Please sign in to comment.