gnash-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-dev] [PATCH] Update testsuite for BitmapData.draw


From: Jürgen Rühle
Subject: [Gnash-dev] [PATCH] Update testsuite for BitmapData.draw
Date: Sat, 9 Feb 2013 20:02:49 +0100

This adds additional tests and comments concerning the remaining failure with
BitmapData.draw.
---
 testsuite/actionscript.all/BitmapData.as |   29 ++++++++++++++++++++++++-----
 1 files changed, 24 insertions(+), 5 deletions(-)

diff --git a/testsuite/actionscript.all/BitmapData.as 
b/testsuite/actionscript.all/BitmapData.as
index 107fcf7..f7ca139 100644
--- a/testsuite/actionscript.all/BitmapData.as
+++ b/testsuite/actionscript.all/BitmapData.as
@@ -541,8 +541,6 @@ check(near(bm, 25, 5, 0xffffff));
 check(near(bm, 25, 15, 0xffffff));
 check(near(bm, 25, 25, 0xffffff));
 
-disp.attachBitmap(bm, 400);
-
 // Mask with different transform, MovieClip with different transform
 mask._x = 10;
 bm = new flash.display.BitmapData(50, 50, false);
@@ -562,7 +560,7 @@ check(near(bm, 25, 25, 0xffffff));
 bm = new flash.display.BitmapData(50, 50, false);
 bm.draw(mc, new flash.geom.Matrix(1, 0, 0, 1, 5, 5));
 
-// A bit of the blue and green blue stripe is visible.
+// A bit of the green and blue stripe is visible.
 check(near(bm, 5, 5, 0xffffff));
 check(near(bm, 5, 15, 0xffffff));
 check(near(bm, 5, 25, 0xffffff));
@@ -571,9 +569,30 @@ check(near(bm, 15, 15, 0xffffff));
 check(near(bm, 15, 25, 0xffffff));
 check(near(bm, 25, 5, 0xffffff));
 check(near(bm, 23, 15, 0x00ff00));
-xcheck(near(bm, 25, 15, 0x0000ff));
+check(near(bm, 24, 15, 0x00ff00));
+xcheck(near(bm, 25, 15, 0x0000ff)); // gnash: 0x0b0bfe
+check(near(bm, 26, 15, 0x0000ff));
 check(near(bm, 25, 25, 0xffffff));
 
+bm = new flash.display.BitmapData(50, 50, false);
+bm.draw(mc, new flash.geom.Matrix(2, 0, 0, 2, 5, 5));
+
+// A bit of the red and green stripe is visible.
+check(near(bm, 5, 5, 0xffffff));
+check(near(bm, 5, 15, 0xffffff));
+check(near(bm, 5, 25, 0xffffff));
+check(near(bm, 15, 5, 0xffffff));
+check(near(bm, 15, 15, 0xffffff));
+check(near(bm, 15, 25, 0xffffff));
+check(near(bm, 25, 5, 0xffffff));
+check(near(bm, 23, 15, 0xff0000));
+check(near(bm, 24, 15, 0xff0000));
+xcheck(near(bm, 25, 15, 0x00ff00)); // gnash: 0x0bfe0b
+check(near(bm, 26, 15, 0x00ff00));
+check(near(bm, 25, 25, 0xffffff));
+
+disp.attachBitmap(bm, 400);
+
 bm = new flash.display.BitmapData(10, 10, true, 0x5010eeff);
 xcheck_equals(bm.getPixel32(5, 5), 0x5010efff);
 
@@ -1127,6 +1146,6 @@ flash.display.BitmapData.prototype = e;
 // END OF TEST
 //-------------------------------------------------------------
 
-totals(392);
+totals(406);
 
 #endif // OUTPUT_VERSION >= 8
-- 
1.7.4.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]