[Top][All Lists]
[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: |
Thu, 24 May 2007 18:43:32 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/05/24 18:43:32
Modified files:
. : ChangeLog
server : sprite_instance.cpp
testsuite/misc-ming.all: replace_buttons1test.c
replace_buttons1test_runner.cpp
replace_sprites1test.c
replace_sprites1test_runner.cpp
Log message:
* server/sprite_instance.cpp (replace_display_object):
When the object being replaced is NOT a scriptable object,
move instead of replacing.
* testsuite/misc-ming.all/: replace_buttons1test.c,
replace_buttons1test_runner.cpp, replace_sprites1test.c,
replace_sprites1test_runner.cpp: Expect less failures.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3343&r2=1.3344
http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.cpp?cvsroot=gnash&r1=1.280&r2=1.281
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/replace_buttons1test.c?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/replace_buttons1test_runner.cpp?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/replace_sprites1test.c?cvsroot=gnash&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/replace_sprites1test_runner.cpp?cvsroot=gnash&r1=1.1&r2=1.2
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3343
retrieving revision 1.3344
diff -u -b -r1.3343 -r1.3344
--- ChangeLog 24 May 2007 18:09:57 -0000 1.3343
+++ ChangeLog 24 May 2007 18:43:31 -0000 1.3344
@@ -1,5 +1,14 @@
2007-05-24 Sandro Santilli <address@hidden>
+ * server/sprite_instance.cpp (replace_display_object):
+ When the object being replaced is NOT a scriptable object,
+ move instead of replacing.
+ * testsuite/misc-ming.all/: replace_buttons1test.c,
+ replace_buttons1test_runner.cpp, replace_sprites1test.c,
+ replace_sprites1test_runner.cpp: Expect less failures.
+
+2007-05-24 Sandro Santilli <address@hidden>
+
* server/: dlist.{cpp,h}, sprite_instance.{cpp,h},
server/swf/PlaceObject2Tag.cpp, server/vm/action.cpp:
Drop the use_matrix/use_color_xform parameters, use
Index: server/sprite_instance.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v
retrieving revision 1.280
retrieving revision 1.281
diff -u -b -r1.280 -r1.281
--- server/sprite_instance.cpp 24 May 2007 18:09:57 -0000 1.280
+++ server/sprite_instance.cpp 24 May 2007 18:43:31 -0000 1.281
@@ -3210,6 +3210,40 @@
}
assert(cdef);
+#define MOVE_NONSHAPES_ON_REPLACE
+#ifdef MOVE_NONSHAPES_ON_REPLACE
+ character* existing_char = m_display_list.get_character_at_depth(depth);
+ if (existing_char)
+ {
+#ifdef GNASH_DEBUG_REPLACE
+ log_debug("Another character exists in depth %d", depth);
+#endif
+ if ( existing_char->isActionScriptReferenceable() )
+ {
+#ifdef GNASH_DEBUG_PLACE
+ log_debug("Char is a scriptable instance, moving rather
then replace");
+#endif
+ // If it's a sprite we move it.
+ // See replace_sprites1test.swf and
replace_buttons1test.swf
+ // Note that for buttons, it seems we should also wipe
out the members !
+ // Maybe this is not the this we're supposed to do
here, rather some weird
+ // simptom from implementation of a proper displaylist
reconstruction.
+ // For example, the REPLACE tag might act like a PLACE
tag when executed
+ // alone, looking for missing info (character_id, name)
in the previous
+ // PLACE tag affecting this same depth..
+ //
+ move_display_object(depth, color_transform, mat, ratio,
clip_depth);
+ return;
+ }
+ }
+ else
+ {
+#ifdef GNASH_DEBUG_REPLACE
+ log_debug("REPLACE: no character exists in depth %d - should
add ?", depth);
+#endif
+ }
+#endif // MOVE_NONSHAPES_ON_REPLACE
+
boost::intrusive_ptr<character> ch =
cdef->create_character_instance(this,
character_id);
Index: testsuite/misc-ming.all/replace_buttons1test.c
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/replace_buttons1test.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- testsuite/misc-ming.all/replace_buttons1test.c 24 May 2007 12:08:04
-0000 1.1
+++ testsuite/misc-ming.all/replace_buttons1test.c 24 May 2007 18:43:31
-0000 1.2
@@ -53,7 +53,7 @@
#include <stdio.h>
#include <ming.h>
-#define OUTPUT_VERSION 6
+#define OUTPUT_VERSION 7
#define OUTPUT_FILENAME "replace_buttons1test.swf"
SWFDisplayItem add_static_mc(SWFMovie mo, const char* name, int depth, int x,
int y, int width, int height);
@@ -189,14 +189,14 @@
// Can still reference the old character and it's variables, after replace
- xcheck_equals(mo, "typeof(static2)", "'undefined'");
- xcheck_equals(mo, "typeof(static1)", "'object'");
- xcheck_equals(mo, "static1._target", "'/static1'");
- xcheck_equals(mo, "static1.name", "'static1'");
- xcheck_equals(mo, "static1._x", "130");
+ check_equals(mo, "typeof(static2)", "'undefined'");
+ check_equals(mo, "typeof(static1)", "'object'");
+ check_equals(mo, "static1._target", "'/static1'");
+ check_equals(mo, "static1.name", "'static1'");
+ check_equals(mo, "static1._x", "130");
// While the new name results undefined...
- xcheck_equals(mo, "typeof(static2)", "'undefined'"); // the name wasn't
changed
+ check_equals(mo, "typeof(static2)", "'undefined'"); // the name wasn't
changed
// Everything suggests that a new instance is NOT created on replace !!!
// Gnash here fails because it creates a NEW instance
@@ -215,14 +215,15 @@
"gotoAndStop(2); "
- // Shapes don't get their onConstruct event invoked !
+ // Buttons don't get their onConstruct event invoked ...
"check_equals(typeof(_root.depth3Constructed), 'undefined');"
// Original character name is still referenceable
"check_equals(typeof(static1), 'object');"
- // It's a new instance !
- "check_equals(typeof(static1.name), 'undefined');"
+ // But it's a new instance !!
+ // Gnash fails here becasue it does a simple *move* instead.
+ "xcheck_equals(typeof(static1.name), 'undefined');"
// We can't check the color or the _x in a self-contained testcase
unfortunately,
// we'll need a MovieTester-based runner for this.
Index: testsuite/misc-ming.all/replace_buttons1test_runner.cpp
===================================================================
RCS file:
/sources/gnash/gnash/testsuite/misc-ming.all/replace_buttons1test_runner.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- testsuite/misc-ming.all/replace_buttons1test_runner.cpp 24 May 2007
12:08:04 -0000 1.1
+++ testsuite/misc-ming.all/replace_buttons1test_runner.cpp 24 May 2007
18:43:31 -0000 1.2
@@ -106,10 +106,10 @@
// check that we have a red square at (130,330 - 190,390)
// Gnash fails here becase it does a *real* replace, while it
// seems we're not supposed to replace, just to move (who knows why?!)
- xcheck_pixel(134, 334, 2, red, 2); // UL
- xcheck_pixel(186, 334, 2, red, 2); // UR
- xcheck_pixel(186, 386, 2, red, 2); // LL
- xcheck_pixel(134, 386, 2, red, 2); // LR
+ check_pixel(134, 334, 2, red, 2); // UL
+ check_pixel(186, 334, 2, red, 2); // UR
+ check_pixel(186, 386, 2, red, 2); // LL
+ check_pixel(134, 386, 2, red, 2); // LR
// and nothing around it...
check_pixel(126, 360, 2, white, 2); // Left
Index: testsuite/misc-ming.all/replace_sprites1test.c
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/replace_sprites1test.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- testsuite/misc-ming.all/replace_sprites1test.c 24 May 2007 14:34:51
-0000 1.7
+++ testsuite/misc-ming.all/replace_sprites1test.c 24 May 2007 18:43:32
-0000 1.8
@@ -194,19 +194,19 @@
// Can still reference the old character and it's variables, after replace
- xcheck_equals(mo, "typeof(static1)", "'movieclip'");
- xcheck_equals(mo, "static1.name", "'static1'");
- xcheck_equals(mo, "static1._target", "'/static1'");
- xcheck_equals(mo, "static1._x", "130");
+ check_equals(mo, "typeof(static1)", "'movieclip'");
+ check_equals(mo, "static1.name", "'static1'");
+ check_equals(mo, "static1._target", "'/static1'");
+ check_equals(mo, "static1._x", "130");
// While the new name results undefined...
- xcheck_equals(mo, "typeof(static2)", "'undefined'");
+ check_equals(mo, "typeof(static2)", "'undefined'");
// Everything suggests that a new instance is NOT created on replace !!!
// Gnash here fails because it creates a NEW instance
// Anyway, the old character matrix changed to 130,330 !
- xcheck_equals(mo, "static1._x", "130");
+ check_equals(mo, "static1._x", "130");
// We can't check the color in a self-contained testcase unfortunately,
// we'll need a MovieTester-based runner for this.
@@ -222,13 +222,13 @@
"gotoAndStop(2); "
// A single instance has been constructed !!
- "xcheck_equals(_root.depth3Constructed, '1');"
+ "check_equals(_root.depth3Constructed, '1');"
// Original character name is still referenceable
"check_equals(typeof(static1), 'movieclip');"
// And it still has it's user-provided property
- "xcheck_equals(static1.name, 'static1');"
+ "check_equals(static1.name, 'static1');"
// The instance have been moved back to its original position (100,300)
"check_equals(static1._x, 100);"
Index: testsuite/misc-ming.all/replace_sprites1test_runner.cpp
===================================================================
RCS file:
/sources/gnash/gnash/testsuite/misc-ming.all/replace_sprites1test_runner.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- testsuite/misc-ming.all/replace_sprites1test_runner.cpp 23 May 2007
18:00:52 -0000 1.1
+++ testsuite/misc-ming.all/replace_sprites1test_runner.cpp 24 May 2007
18:43:32 -0000 1.2
@@ -104,12 +104,10 @@
check( invalidated.contains(redRange2) );
// check that we have a red square at (130,330 - 190,390)
- // Gnash fails here becase it does a *real* replace, while it
- // seems we're not supposed to replace, just to move (who knows why?!)
- xcheck_pixel(134, 334, 2, red, 2); // UL
- xcheck_pixel(186, 334, 2, red, 2); // UR
- xcheck_pixel(186, 386, 2, red, 2); // LL
- xcheck_pixel(134, 386, 2, red, 2); // LR
+ check_pixel(134, 334, 2, red, 2); // UL
+ check_pixel(186, 334, 2, red, 2); // UR
+ check_pixel(186, 386, 2, red, 2); // LL
+ check_pixel(134, 386, 2, red, 2); // LR
// and nothing around it...
check_pixel(126, 360, 2, white, 2); // Left