gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash/server sprite_instance.cpp sprite_instance.h


From: Zou Lunkai
Subject: [Gnash-commit] gnash/server sprite_instance.cpp sprite_instance.h
Date: Fri, 31 Aug 2007 07:56:11 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Zou Lunkai <zoulunkai>  07/08/31 07:56:11

Modified files:
        server         : sprite_instance.cpp sprite_instance.h 

Log message:
        comments update.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.cpp?cvsroot=gnash&r1=1.316&r2=1.317
http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.h?cvsroot=gnash&r1=1.133&r2=1.134

Patches:
Index: sprite_instance.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v
retrieving revision 1.316
retrieving revision 1.317
diff -u -b -r1.316 -r1.317
--- sprite_instance.cpp 30 Aug 2007 18:19:15 -0000      1.316
+++ sprite_instance.cpp 31 Aug 2007 07:56:10 -0000      1.317
@@ -2784,6 +2784,12 @@
     //  (2) we are in jump-back-mode
     if(!existing_char || is_jumping_back)
     {
+        // TODO: Optimize this.
+        // Create_character_instance() is too expensive for some characters.
+        // All I need to do here might be just syntetize a new instance name,
+        // the real character is not needed.
+        // To decide whether a new instance name is needed for static 
characters, 
+        // a single character_id should be enough. 
         ch = cdef->create_character_instance(this, character_id);
         ch->setTimelineInfo(depth, m_current_frame, false);
 
@@ -2835,6 +2841,8 @@
     {
         // remove the created character from the key listener list,
         // it might be there(eg. button_character).
+               // TODO: optimize this.  This is not necessary if we don't 
create
+               // instances blindly above.
         _vm.getRoot().remove_key_listener(ch.get());
 
         move_display_object(depth, &color_transform, &mat, ratio, clip_depth);

Index: sprite_instance.h
===================================================================
RCS file: /sources/gnash/gnash/server/sprite_instance.h,v
retrieving revision 1.133
retrieving revision 1.134
diff -u -b -r1.133 -r1.134
--- sprite_instance.h   30 Aug 2007 18:19:16 -0000      1.133
+++ sprite_instance.h   31 Aug 2007 07:56:11 -0000      1.134
@@ -317,7 +317,7 @@
        /// controlled by the is_jumping_back flag. If false, this
        /// call will result in a no-op. If true, the previously existing 
character
        /// will be replaced by the new one, with unload() method invoked on the
-       /// removed character. (zou: correct?)
+       /// removed character. 
        ///
        /// Any successful new placement triggers invokation of the newly 
created
        /// instance's LOAD event.
@@ -355,8 +355,7 @@
        /// @return 
        ///     A pointer to the character being added or NULL
        ///     if this call results in a move of an existing character 
-       ///     or in a no-op due to is_jumping_back being
-       ///     false. (zou: correct?)
+       ///     or in a no-op due to is_jumping_back being false. 
        ///       
        character* add_display_object(
                uint16_t character_id,




reply via email to

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