gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog server/button_character_instanc...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog server/button_character_instanc...
Date: Sat, 16 Jun 2007 06:30:30 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/06/16 06:30:30

Modified files:
        .              : ChangeLog 
        server         : button_character_instance.cpp 
                         button_character_instance.h font.cpp font.h 
                         generic_character.h 

Log message:
                * server/button_character_instance.{cpp,h}: implement
                  markReachableResources to properly mark the state characters
                  and the character definition.
                * server/font.{cpp,h}: make texture_glyph a concrete class, no
                  more managed.
                * server/generic_character.h: implement markReachableResources 
to
                  properly mark the character definition.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3553&r2=1.3554
http://cvs.savannah.gnu.org/viewcvs/gnash/server/button_character_instance.cpp?cvsroot=gnash&r1=1.49&r2=1.50
http://cvs.savannah.gnu.org/viewcvs/gnash/server/button_character_instance.h?cvsroot=gnash&r1=1.21&r2=1.22
http://cvs.savannah.gnu.org/viewcvs/gnash/server/font.cpp?cvsroot=gnash&r1=1.39&r2=1.40
http://cvs.savannah.gnu.org/viewcvs/gnash/server/font.h?cvsroot=gnash&r1=1.24&r2=1.25
http://cvs.savannah.gnu.org/viewcvs/gnash/server/generic_character.h?cvsroot=gnash&r1=1.23&r2=1.24

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3553
retrieving revision 1.3554
diff -u -b -r1.3553 -r1.3554
--- ChangeLog   15 Jun 2007 20:58:51 -0000      1.3553
+++ ChangeLog   16 Jun 2007 06:30:28 -0000      1.3554
@@ -1,3 +1,13 @@
+2007-06-16 Sandro Santilli <address@hidden>
+
+       * server/button_character_instance.{cpp,h}: implement
+         markReachableResources to properly mark the state characters
+         and the character definition.
+       * server/font.{cpp,h}: make texture_glyph a concrete class, no
+         more managed.
+       * server/generic_character.h: implement markReachableResources to
+         properly mark the character definition.
+
 2007-06-14 Sandro Santilli <address@hidden>
 
        * server/sprite_instance.{cpp,h} (markReachableResources):

Index: server/button_character_instance.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/button_character_instance.cpp,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -b -r1.49 -r1.50
--- server/button_character_instance.cpp        8 Jun 2007 12:11:49 -0000       
1.49
+++ server/button_character_instance.cpp        16 Jun 2007 06:30:29 -0000      
1.50
@@ -897,6 +897,26 @@
        // We'll not call it here..
 }
 
+#ifdef GNASH_USE_GC
+void
+button_character_instance::markReachableResources() const
+{
+       assert(isReachable());
+
+       m_def->setReachable();
+
+       // Markstate characters as reachable
+       for (CharsVect::const_iterator i=m_record_character.begin(), 
e=m_record_character.end();
+                       i!=e; ++i)
+       {
+               (*i)->setReachable();
+       }
+
+       // character class members
+       markCharacterReachable();
+}
+#endif // GNASH_USE_GC
+
 } // end of namespace gnash
 
 

Index: server/button_character_instance.h
===================================================================
RCS file: /sources/gnash/gnash/server/button_character_instance.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- server/button_character_instance.h  28 May 2007 15:41:05 -0000      1.21
+++ server/button_character_instance.h  16 Jun 2007 06:30:29 -0000      1.22
@@ -21,7 +21,7 @@
 
 // SWF buttons.  Mouse-sensitive update/display, actions, etc.
 
-/* $Id: button_character_instance.h,v 1.21 2007/05/28 15:41:05 ann Exp $ */
+/* $Id: button_character_instance.h,v 1.22 2007/06/16 06:30:29 strk Exp $ */
 
 #ifndef GNASH_BUTTON_CHARACTER_INSTANCE_H
 #define GNASH_BUTTON_CHARACTER_INSTANCE_H
@@ -55,7 +55,10 @@
 {
 public:
        button_character_definition*    m_def;
-       std::vector< boost::intrusive_ptr<character> >  m_record_character;
+
+       typedef std::vector< boost::intrusive_ptr<character> > CharsVect;
+
+       CharsVect m_record_character;
 
        enum mouse_flags
        {
@@ -148,6 +151,18 @@
        /// Properly initialize instance names for contained sprites
        virtual void construct();
 
+protected:
+
+#ifdef GNASH_USE_GC
+       /// Mark reachabe resources (for the GC)
+       //
+       /// These are:
+       ///     - this char's definition (m_def)
+       ///     - the vector of state characters (m_record_character)
+       ///
+       void markReachableResources() const;
+#endif // GNASH_USE_GC
+
 private:
        bool m_enabled;
 

Index: server/font.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/font.cpp,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -b -r1.39 -r1.40
--- server/font.cpp     15 Jun 2007 15:00:29 -0000      1.39
+++ server/font.cpp     16 Jun 2007 06:30:29 -0000      1.40
@@ -17,7 +17,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-/* $Id: font.cpp,v 1.39 2007/06/15 15:00:29 strk Exp $ */
+/* $Id: font.cpp,v 1.40 2007/06/16 06:30:29 strk Exp $ */
 
 // Based on the public domain work of Thatcher Ulrich <address@hidden> 2003
 
@@ -630,7 +630,7 @@
        // Mark textured glyphs
        for (TextureGlyphVect::const_iterator i=m_texture_glyphs.begin(), 
e=m_texture_glyphs.end(); i!=e; ++i)
        {
-               i->setReachable();
+               i->markReachableResources();
        }
 
        // Mark vector glyphs

Index: server/font.h
===================================================================
RCS file: /sources/gnash/gnash/server/font.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- server/font.h       15 Jun 2007 15:00:29 -0000      1.24
+++ server/font.h       16 Jun 2007 06:30:29 -0000      1.25
@@ -34,7 +34,7 @@
 
        
        /// class for holding (cached) textured glyph info.
-       class texture_glyph : public ref_counted
+       class texture_glyph // : public ref_counted
        {
 
        public:
@@ -57,6 +57,15 @@
                        m_bitmap_info = bi;
                }
 
+#ifdef GNASH_USE_GC
+               /// Mark the contained bitmap info as being reachable
+               void markReachableResources() const
+               {
+                       if ( m_bitmap_info.get() ) 
m_bitmap_info->setReachable();
+               }
+#endif
+
+
        // too early to make these private, fontlib directly accesses
        // them, postponed.
        //private:
@@ -67,15 +76,6 @@
 
                // the origin of the glyph box, in uv coords
                point   m_uv_origin;
-       protected:
-
-#ifdef GNASH_USE_GC
-               /// Mark the contained bitmap info as being reachable
-               void markReachableResources() const
-               {
-                       if ( m_bitmap_info.get() ) 
m_bitmap_info->setReachable();
-               }
-#endif
 
        };
 

Index: server/generic_character.h
===================================================================
RCS file: /sources/gnash/gnash/server/generic_character.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- server/generic_character.h  28 May 2007 15:41:06 -0000      1.23
+++ server/generic_character.h  16 Jun 2007 06:30:29 -0000      1.24
@@ -48,6 +48,21 @@
 
        boost::intrusive_ptr<character_def> m_def;
 
+#ifdef GNASH_USE_GC
+       /// Mark reachabe resources (for the GC)
+       //
+       /// These are:
+       ///     - this char's definition (m_def)
+       ///
+       void markReachableResources() const
+       {
+               assert(isReachable());
+               m_def->setReachable();
+
+               markCharacterReachable();
+       }
+#endif // GNASH_USE_GC
+
 public:
 
        generic_character(character_def* def, character* parent, int id)




reply via email to

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