gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog server/movie_root.cpp server/mo...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog server/movie_root.cpp server/mo...
Date: Mon, 01 Oct 2007 22:42:00 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/10/01 22:41:59

Modified files:
        .              : ChangeLog 
        server         : movie_root.cpp movie_root.h 
        testsuite      : MovieTester.cpp MovieTester.h 

Log message:
                * server/movie_root.{cpp,h}: remove the error-prone ::restart 
method.
                * testsuite/MovieTester.{cpp,h}: implement proper restart 
method.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4495&r2=1.4496
http://cvs.savannah.gnu.org/viewcvs/gnash/server/movie_root.cpp?cvsroot=gnash&r1=1.101&r2=1.102
http://cvs.savannah.gnu.org/viewcvs/gnash/server/movie_root.h?cvsroot=gnash&r1=1.78&r2=1.79
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/MovieTester.cpp?cvsroot=gnash&r1=1.52&r2=1.53
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/MovieTester.h?cvsroot=gnash&r1=1.31&r2=1.32

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.4495
retrieving revision 1.4496
diff -u -b -r1.4495 -r1.4496
--- ChangeLog   1 Oct 2007 22:04:40 -0000       1.4495
+++ ChangeLog   1 Oct 2007 22:41:58 -0000       1.4496
@@ -1,5 +1,10 @@
 2007-10-01 Sandro Santilli <address@hidden>
 
+       * server/movie_root.{cpp,h}: remove the error-prone ::restart method.
+       * testsuite/MovieTester.{cpp,h}: implement proper restart method.
+
+2007-10-01 Sandro Santilli <address@hidden>
+
        * server/movie_root.{cpp,h}: add a clear() method for clearing
          everything managed by the movie_root/stage. Intended to be called
          right before a brand new setRootMovie call (for restart).

Index: server/movie_root.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/movie_root.cpp,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -b -r1.101 -r1.102
--- server/movie_root.cpp       1 Oct 2007 22:04:41 -0000       1.101
+++ server/movie_root.cpp       1 Oct 2007 22:41:59 -0000       1.102
@@ -203,40 +203,6 @@
        setInvalidated();
 }
 
-void
-movie_root::restart()
-{
-       // wipe out live chars
-       _liveChars.clear();
-
-       // wipe out queued actions
-       _actionQueue.clear();
-
-       // Get an handle to definition of _level0 
-       //
-       // TODO: this is bogus, in case _level0 was loaded into
-       //
-       boost::intrusive_ptr<movie_definition> level0Def = 
getLevel(0)->get_movie_definition();
-
-       // wipe out all levels
-       _movies.clear();
-
-       boost::intrusive_ptr<movie_instance> level0 = 
level0Def->create_movie_instance();
-
-       setRootMovie(level0.get());
-
-       // Delete characters removed from the stage
-       // from the display lists
-       cleanupDisplayList();
-
-#ifdef GNASH_USE_GC
-       // Run the garbage collector again
-       GC::get().collect();
-#endif
-
-       setInvalidated();
-}
-
 boost::intrusive_ptr<Stage>
 movie_root::getStageObject()
 {

Index: server/movie_root.h
===================================================================
RCS file: /sources/gnash/gnash/server/movie_root.h,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -b -r1.78 -r1.79
--- server/movie_root.h 1 Oct 2007 22:04:41 -0000       1.78
+++ server/movie_root.h 1 Oct 2007 22:41:59 -0000       1.79
@@ -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: movie_root.h,v 1.78 2007/10/01 22:04:41 strk Exp $ */
+/* $Id: movie_root.h,v 1.79 2007/10/01 22:41:59 strk Exp $ */
 
 /// \page events_handling Handling of user events
 ///
@@ -431,15 +431,6 @@
         return m_background_color.m_a / 255.0f;
     }
 
-    /// Restart this application as if it was just loaded
-    //
-    /// NOTE: this doesn't work correctly in that rather then
-    ///       re-instantiating the original root movie it only
-    ///              picks *current* _level0, restarts it and place it
-    ///              back on stage.
-    ///
-    void restart();
-
     /// Entry point for movie advancement
     //
     /// This function does:

Index: testsuite/MovieTester.cpp
===================================================================
RCS file: /sources/gnash/gnash/testsuite/MovieTester.cpp,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -b -r1.52 -r1.53
--- testsuite/MovieTester.cpp   27 Sep 2007 11:44:33 -0000      1.52
+++ testsuite/MovieTester.cpp   1 Oct 2007 22:41:59 -0000       1.53
@@ -495,8 +495,11 @@
 void
 MovieTester::restart() 
 {
-       _movie_root->restart();
-       _movie = _movie_root->getLevel(0).get();
+       _movie_root->clear(); // restart();
+       _movie = _movie_def->create_movie_instance();
+       _movie_root->setRootMovie(_movie);
+
+       // Set _movie before calling ::render
        render();
 }
 

Index: testsuite/MovieTester.h
===================================================================
RCS file: /sources/gnash/gnash/testsuite/MovieTester.h,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- testsuite/MovieTester.h     27 Sep 2007 11:44:33 -0000      1.31
+++ testsuite/MovieTester.h     1 Oct 2007 22:41:59 -0000       1.32
@@ -26,6 +26,7 @@
 #include "sound_handler.h" // for creating the "test" sound handlers
 #include "types.h" // for rgba class
 #include "render_handler.h" // for dtor visibility by auto_ptr
+#include "movie_instance.h" 
 
 #include <memory> // for auto_ptr
 #include <string> 
@@ -284,7 +285,7 @@
 
        gnash::movie_definition* _movie_def;
 
-       gnash::sprite_instance* _movie;
+       gnash::movie_instance* _movie;
 
        std::auto_ptr<sound_handler> _sound_handler;
 




reply via email to

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