[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/vm/ExecutableCode.h test...
From: |
Zou Lunkai |
Subject: |
[Gnash-commit] gnash ChangeLog server/vm/ExecutableCode.h test... |
Date: |
Fri, 30 Nov 2007 09:59:05 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Zou Lunkai <zoulunkai> 07/11/30 09:59:05
Modified files:
. : ChangeLog
server/vm : ExecutableCode.h
testsuite/misc-ming.all: displaylist_depths_test2.c loop_test6.c
loop_test8.c
place_and_remove_object_insane_test.c
Log message:
* server/vm/ExecutableCode.h: don't push or execute any event code
for unloaded characters(don't need to do this check if opcode guard
is clear and sane).
* testsuite/misc-ming.all/loop_test6.c: two more xpasses.
* testsuite/misc-ming.all/displaylist_depths_test2.c, loop_test8.c,
place_and_remove_object_insane_test.c: comments or small fixs.
some pre-works for timeline control attempt5.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5023&r2=1.5024
http://cvs.savannah.gnu.org/viewcvs/gnash/server/vm/ExecutableCode.h?cvsroot=gnash&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/displaylist_depths_test2.c?cvsroot=gnash&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/loop_test6.c?cvsroot=gnash&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/loop_test8.c?cvsroot=gnash&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/place_and_remove_object_insane_test.c?cvsroot=gnash&r1=1.12&r2=1.13
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5023
retrieving revision 1.5024
diff -u -b -r1.5023 -r1.5024
--- ChangeLog 30 Nov 2007 05:58:48 -0000 1.5023
+++ ChangeLog 30 Nov 2007 09:59:04 -0000 1.5024
@@ -1,3 +1,12 @@
+2007-11-30 Zou Lunkai <address@hidden>
+
+ * server/vm/ExecutableCode.h: don't push or execute any event code
+ for unloaded characters(don't need to do this check if opcode guard
+ is clear and sane).
+ * testsuite/misc-ming.all/loop_test6.c: two more xpasses.
+ * testsuite/misc-ming.all/displaylist_depths_test2.c, loop_test8.c,
+ place_and_remove_object_insane_test.c: comments or small fixs.
+
2007-11-29 Bastiaan Jacques <address@hidden>
* backend/render_handler_ogl.cpp: Draw rounded outlines. Fixes bug
Index: server/vm/ExecutableCode.h
===================================================================
RCS file: /sources/gnash/gnash/server/vm/ExecutableCode.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- server/vm/ExecutableCode.h 4 Sep 2007 21:50:21 -0000 1.10
+++ server/vm/ExecutableCode.h 30 Nov 2007 09:59:04 -0000 1.11
@@ -15,7 +15,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-/* $Id: ExecutableCode.h,v 1.10 2007/09/04 21:50:21 strk Exp $ */
+/* $Id: ExecutableCode.h,v 1.11 2007/11/30 09:59:04 zoulunkai Exp $ */
#ifndef GNASH_EXECUTABLECODE_H
#define GNASH_EXECUTABLECODE_H
@@ -134,20 +134,22 @@
///
void addAction(const action_buffer& buffer)
{
+ // don't push actions for destroyed characters,
+ // our opcode guard is bogus at the moment.
+ if( ! _target->isDestroyed() )
+ {
_buffers.push_back(&buffer);
}
+ }
virtual void execute()
{
- // We do want to call the onUnload event handler !!
- //if ( _target->isUnloaded() )
- //{
- //log_msg("Sprite %s unloaded, won't execute global
code in it", target->getTargetPath().c_str());
- // return;
- //}
for (BufferList::iterator it=_buffers.begin(),
itEnd=_buffers.end();
it != itEnd; ++it)
{
+ // onClipEvents code are guarded by isDestroyed(), still might be
also guarded by isUnloaded()
+ if( _target->isDestroyed() ) break;
+
ActionExec exec(*(*it), _target->get_environment(),
false);
exec();
}
@@ -192,8 +194,12 @@
virtual void execute()
{
+ // don't execute any events for destroyed character.
+ if( !_target->isDestroyed() )
+ {
_target->on_event(_eventId);
}
+ }
#ifdef GNASH_USE_GC
/// Mark reachable resources (for the GC)
Index: testsuite/misc-ming.all/displaylist_depths_test2.c
===================================================================
RCS file:
/sources/gnash/gnash/testsuite/misc-ming.all/displaylist_depths_test2.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- testsuite/misc-ming.all/displaylist_depths_test2.c 9 Nov 2007 19:58:03
-0000 1.9
+++ testsuite/misc-ming.all/displaylist_depths_test2.c 30 Nov 2007 09:59:05
-0000 1.10
@@ -39,7 +39,7 @@
*
* frame2: character placed at depth -16381 at position (10,200)
* frame4: position of instance at depth -16381 shifted to the right (50,200)
- * frame5: position of instance at depth -16381 shifted to the right (100,200)
+ * frame5: position of instance at depth -16381 shifted to the right (200,200)
* frame6: depth of instance changed to 10 (dynamic zone) and stop.
* frame7: jump back to frame 4
*
@@ -49,7 +49,7 @@
* After the jump we have two instances:
* - one at depth 10 and position 100,200
* (the same we had before, with its state intact)
- * - another at depth -16381 and position 20,200
+ * - another at depth -16381 and position 50,200
* (newly created and placed accordingly to the PlaceObject2 tag on
frame4)
* Two distinct instances have been constructed in total.
*
@@ -148,7 +148,7 @@
);
SWFMovie_nextFrame(mo);
- // Frame 5: move character at depth 3 to position 100,200
+ // Frame 5: move character at depth 3 to position 200,200
SWFDisplayItem_moveTo(it1, 200, 200);
add_actions(mo,
"check_equals(static3.myThing, 'guess');"
Index: testsuite/misc-ming.all/loop_test6.c
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/loop_test6.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- testsuite/misc-ming.all/loop_test6.c 24 Sep 2007 08:41:56 -0000
1.6
+++ testsuite/misc-ming.all/loop_test6.c 30 Nov 2007 09:59:05 -0000
1.7
@@ -162,8 +162,8 @@
// onClipConstruct invoked or not during jumping back is dependent
// on whether the onClipUnload has been defined.
// Gnash fails by calling onClipConstruct again without considering
onClipUnload!!
- xcheck_equals(mo, "_root.mc1Constructed", "1");
- xcheck_equals(mo, "_root.mc1Initialized", "1");
+ check_equals(mo, "_root.mc1Constructed", "1");
+ check_equals(mo, "_root.mc1Initialized", "1");
check_equals(mo, "_root.mc2Constructed", "2");
check_equals(mo, "_root.mc2Initialized", "2");
Index: testsuite/misc-ming.all/loop_test8.c
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/loop_test8.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- testsuite/misc-ming.all/loop_test8.c 1 Sep 2007 01:20:47 -0000
1.7
+++ testsuite/misc-ming.all/loop_test8.c 30 Nov 2007 09:59:05 -0000
1.8
@@ -230,6 +230,8 @@
check_equals(mo, "mc1Unloaded", "0");
check_equals(mo, "mc2Unloaded", "1");
check_equals(mo, "mc3Unloaded", "1");
+
+ add_actions(mo, "totals();");
SWFMovie_nextFrame(mo); // 6th frame
//Output movie
Index: testsuite/misc-ming.all/place_and_remove_object_insane_test.c
===================================================================
RCS file:
/sources/gnash/gnash/testsuite/misc-ming.all/place_and_remove_object_insane_test.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- testsuite/misc-ming.all/place_and_remove_object_insane_test.c 9 Aug
2007 12:18:07 -0000 1.12
+++ testsuite/misc-ming.all/place_and_remove_object_insane_test.c 30 Nov
2007 09:59:05 -0000 1.13
@@ -19,9 +19,26 @@
/*
* Zou Lunkai, address@hidden
*
- * Test for tag PlaceObject2 and also sprite_instance::advance_sprite(float
delta_time)
+ * Timeline:
*
- * TODO: add description here !
+ * Frame | 1 | 2 | 3 |
+ * --------+----+----+----+
+ * Event |PPP |RRR |PPPP|
+ *
+ * P = place (by PlaceObject2)
+ * R = remove (by RemoveObject)
+ *
+ * Description:
+ *
+ * frame1: place mc_red at depth3, mc_blue at depth30, mc_black at depth40
+ * frame2: remove mc_red, mc_blue, mc_black
+ * frame3: place mc_red at depth3 again with a different ratio; place mc_blue
+ * at depth30 again with the same ratio; place mc_black at depth40
again
+ * but with a different name; place mc_green at depth4.
+ *
+ * Observed:
+ *
+ * loop back obeys the same rule as jump back.
*
* run as ./place_and_remove_object_insane_test
*/
@@ -102,9 +119,7 @@
check_equals(mo, "typeof(_root.mc_blue)", "'movieclip'");
check_equals(mo, "_root.mc_green", "undefined");
- // For myself, all xchecks bellow are insane.
- // I don't know why MM player pass it. The mystery seems
- // related to ratio value.
+
add_actions(mo, " _root.mc_red._x += 10; \
if(counter == undefined) \
{ \
@@ -142,12 +157,10 @@
it_blue = SWFMovie_add(mo, (SWFBlock)mc_blue); //add mc_blue to the 3rd
frame at depth 30 again
SWFDisplayItem_setDepth(it_blue, 30);
SWFDisplayItem_setName(it_blue, "mc_blue");
- //SWFDisplayItem_setRatio(it, 2.0); //Don't set ratio this time!
it_black = SWFMovie_add(mo, (SWFBlock)mc_black); //add mc_black to the 3rd
frame at depth 40 again
SWFDisplayItem_setDepth(it_black, 40);
SWFDisplayItem_setName(it_black, "mc_black_name_changed");
- //SWFDisplayItem_setRatio(it_black, 2.0); //Don't set ratio this time!
it_green = SWFMovie_add(mo, (SWFBlock)mc_green); //add mc_green to the 3rd
frame at depth 4
SWFDisplayItem_setDepth(it_green, 4);
- [Gnash-commit] gnash ChangeLog server/vm/ExecutableCode.h test...,
Zou Lunkai <=