gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog server/sprite_instance.cpp test...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog server/sprite_instance.cpp test...
Date: Sat, 14 Apr 2007 16:27:23 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/04/14 16:27:22

Modified files:
        .              : ChangeLog 
        server         : sprite_instance.cpp 
        testsuite/actionscript.all: MovieClip.as check.as 

Log message:
                * server/sprite_instance.cpp (sprite_getBounds): round bounds
                  to twips.
                * testsuite/actionscript.all/MovieClip.as: more successes.
                * testsuite/actionscript.all/check.as: Revert bastiaan patch,
                  changing semantic of most tests.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2872&r2=1.2873
http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.cpp?cvsroot=gnash&r1=1.239&r2=1.240
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/MovieClip.as?cvsroot=gnash&r1=1.56&r2=1.57
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/check.as?cvsroot=gnash&r1=1.26&r2=1.27

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2872
retrieving revision 1.2873
diff -u -b -r1.2872 -r1.2873
--- ChangeLog   14 Apr 2007 15:53:17 -0000      1.2872
+++ ChangeLog   14 Apr 2007 16:27:22 -0000      1.2873
@@ -1,3 +1,11 @@
+2007-04-14 Sandro Santilli <address@hidden>
+
+       * server/sprite_instance.cpp (sprite_getBounds): round bounds
+         to twips.
+       * testsuite/actionscript.all/MovieClip.as: more successes.
+       * testsuite/actionscript.all/check.as: Revert bastiaan patch,
+         changing semantic of most tests.
+
 2007-04-14 Bastiaan Jacques <address@hidden>
 
        * server/asobj/{Loadvars,NetStream,Sound,xmlnode}.cpp: Use
@@ -8,11 +16,13 @@
        * testsuite/actionscript.all/check.as: Don't prepend # where
        it is not needed to avoid choking gcc3's C preprocessor.
        * testsuite/libamf.all/{test_number,test_string}.cpp,
-       * testsuite/misc.ming.all/{intervalTestRunner,
+       testsuite/misc.ming.all/{intervalTestRunner,
        loadMovieTestRunner}: Add needed includes for OpenBSD.
 
-2007-04-12 Sandro Santilli <address@hidden>
+2007-04-14 Sandro Santilli <address@hidden>
 
+       * server/sprite_instance.cpp (sprite_getBounds): round bounds
+         to twips.
        * server/matrix.{h,cpp}: fix conceptual bug in Range2d transform
          function.
        * testsuite/misc-ming.all/displaylist_depths_test.c,

Index: server/sprite_instance.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v
retrieving revision 1.239
retrieving revision 1.240
diff -u -b -r1.239 -r1.240
--- server/sprite_instance.cpp  13 Apr 2007 07:35:55 -0000      1.239
+++ server/sprite_instance.cpp  14 Apr 2007 16:27:22 -0000      1.240
@@ -815,15 +815,15 @@
 
                //m.transform(bounds);
                //tgtwmat.transform_by_inverse(bounds);
-               std::stringstream ss;
+               //std::stringstream ss;
 
-               ss << "Local bounds: " << bounds << endl;
+               //ss << "Local bounds: " << bounds << endl;
                srcwmat.transform(bounds);
-               ss << "src-w-transformed bounds: " << bounds << "(srcwmat is " 
<< srcwmat << ")" << endl;
+               //ss << "src-w-transformed bounds: " << bounds << "(srcwmat is 
" << srcwmat << ")" << endl;
                tgtwmat.transform_by_inverse(bounds);
-               ss << "tgt-w-invtransfor bounds: " << bounds << "(tgtwmat is " 
<< tgtwmat << ")" << endl;
-               log_msg("%s", ss.str().c_str());
-               log_error("FIXME: MovieClip.getBounds(%s) broken", 
fn.arg(0).to_debug_string().c_str());
+               //ss << "tgt-w-invtransfor bounds: " << bounds << "(tgtwmat is 
" << tgtwmat << ")" << endl;
+               //log_msg("%s", ss.str().c_str());
+               log_error("FIXME: MovieClip.getBounds(%s) TESTING", 
fn.arg(0).to_debug_string().c_str());
        }
 
        // Magic numbers here... dunno why
@@ -834,10 +834,11 @@
 
        if ( bounds.isFinite() )
        {
-               xMin = bounds.getMinX()/20;
-               yMin = bounds.getMinY()/20;
-               xMax = bounds.getMaxX()/20;
-               yMax = bounds.getMaxY()/20;
+               // Round to the twip
+               xMin = int(rint(bounds.getMinX())) / 20.0f;
+               yMin = int(rint(bounds.getMinY())) / 20.0f;
+               xMax = int(rint(bounds.getMaxX())) / 20.0f;
+               yMax = int(rint(bounds.getMaxY())) / 20.0f;
        }
 
        boost::intrusive_ptr<as_object> bounds_obj(new as_object());
@@ -846,14 +847,6 @@
        bounds_obj->init_member("xMax", as_value(xMax));
        bounds_obj->init_member("yMax", as_value(yMax));
 
-       // xMin, xMax, yMin, and yMax
-       static bool warned = false;
-       if ( ! warned )
-       {
-               log_error("FIXME: MovieClip.getBounds() TESTING");
-               warned=true;
-       }
-
        return as_value(bounds_obj.get());
 }
 

Index: testsuite/actionscript.all/MovieClip.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/MovieClip.as,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -b -r1.56 -r1.57
--- testsuite/actionscript.all/MovieClip.as     14 Apr 2007 14:38:29 -0000      
1.56
+++ testsuite/actionscript.all/MovieClip.as     14 Apr 2007 16:27:22 -0000      
1.57
@@ -22,7 +22,7 @@
 // compile this test case with Ming makeswf, and then
 // execute it like this gnash -1 -r 0 -v out.swf
 
-rcsid="$Id: MovieClip.as,v 1.56 2007/04/14 14:38:29 strk Exp $";
+rcsid="$Id: MovieClip.as,v 1.57 2007/04/14 16:27:22 strk Exp $";
 
 #include "check.as"
 
@@ -584,8 +584,8 @@
 check_equals(b.yMax, 30);
 b = draw.getBounds(container); // these are transformed by container draw 
matrix
 check_equals(b.xMin, -30);
-xcheck_equals(b.xMax, -10);
-xcheck_equals(b.yMin, 10);
+check_equals(b.xMax, -10);
+check_equals(b.yMin, 10);
 check_equals(b.yMax, 20);
 
 draw._visible = false;
@@ -598,8 +598,8 @@
 check_equals(b.yMax, 30);
 b = draw.getBounds(container); // these are transformed by container draw 
matrix
 check_equals(b.xMin, -30);
-xcheck_equals(b.xMax, -10);
-xcheck_equals(b.yMin, 10);
+check_equals(b.xMax, -10);
+check_equals(b.yMin, 10);
 check_equals(b.yMax, 20);
 
 draw._xscale = 200;

Index: testsuite/actionscript.all/check.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/check.as,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
--- testsuite/actionscript.all/check.as 14 Apr 2007 15:53:18 -0000      1.26
+++ testsuite/actionscript.all/check.as 14 Apr 2007 16:27:22 -0000      1.27
@@ -67,21 +67,21 @@
 //
 //   getUrl( MEDIA(green.swf) );
 //
-#define MEDIA(x) MEDIADIR + "/" + x
+#define MEDIA(x) MEDIADIR + "/" + #x
 
 //
 // Use check(<expression>)
 //
 #define check(expr)  \
-       if ( expr ) pass_check(expr + \
+       if ( expr ) pass_check(#expr + \
                " [" + __FILE__ + ":" + __LINE__ + "]" ); \
-       else fail_check(expr + \
+       else fail_check(#expr + \
                " [" + __FILE__ + ":" + __LINE__ + "]" ); \
 
 #define xcheck(expr)  \
-        if ( expr ) xpass_check(expr + \
+        if ( expr ) xpass_check(#expr + \
                " [" + __FILE__ + ":" + __LINE__ + "]" ); \
-        else xfail_check(expr + \
+        else xfail_check(#expr + \
                " [" + __FILE__ + ":" + __LINE__ + "]" ); \
 
 //
@@ -89,17 +89,17 @@
 //
 #define check_equals(obt, exp)  \
        if ( obt == exp ) pass_check( \
-               obt + " == " + exp + \
+               #obt + " == " + #exp + \
                " [" + __FILE__ + ":" + __LINE__ + "]" ); \
-       else fail_check("expected: " + exp + \
+       else fail_check("expected: " + #exp + \
                " obtained: " + obt + \
                " [" + __FILE__ + ":" + __LINE__ + "]" ); \
 
 #define xcheck_equals(obt, exp)  \
         if ( obt == exp ) xpass_check( \
-                obt + " == " + exp + \
+                #obt + " == " + #exp + \
                " [" + __FILE__ + ":" + __LINE__ + "]" ); \
-        else xfail_check("expected: " + exp + \
+        else xfail_check("expected: " + #exp + \
                 " obtained: " + obt + \
                " [" + __FILE__ + ":" + __LINE__ + "]" ); \
 




reply via email to

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