[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/character.h server/dlist...
From: |
Zou Lunkai |
Subject: |
[Gnash-commit] gnash ChangeLog server/character.h server/dlist... |
Date: |
Fri, 07 Dec 2007 01:33:26 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Zou Lunkai <zoulunkai> 07/12/07 01:33:26
Modified files:
. : ChangeLog
server : character.h dlist.cpp dlist.h
sprite_instance.cpp
Log message:
* server/character.h, sprite_instance.cpp, dlist.{h,cpp}:
remove the TimelineInfor class, it's no longer needed in the
new timeline control design.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5101&r2=1.5102
http://cvs.savannah.gnu.org/viewcvs/gnash/server/character.h?cvsroot=gnash&r1=1.112&r2=1.113
http://cvs.savannah.gnu.org/viewcvs/gnash/server/dlist.cpp?cvsroot=gnash&r1=1.108&r2=1.109
http://cvs.savannah.gnu.org/viewcvs/gnash/server/dlist.h?cvsroot=gnash&r1=1.60&r2=1.61
http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.cpp?cvsroot=gnash&r1=1.405&r2=1.406
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5101
retrieving revision 1.5102
diff -u -b -r1.5101 -r1.5102
--- ChangeLog 6 Dec 2007 15:19:10 -0000 1.5101
+++ ChangeLog 7 Dec 2007 01:33:25 -0000 1.5102
@@ -1,3 +1,8 @@
+2007-12-07 Zou Lunkai <address@hidden>
+ * server/character.h, sprite_instance.cpp, dlist.{h,cpp}:
+ deprecate the TimelineInfor class, it's no longer needed in the
+ new timeline control design.
+
2007-12-06 Sandro Santilli <address@hidden>
* testsuite/misc-swfc.all/Dejagnu.sc: print __END_OF_TEST__
Index: server/character.h
===================================================================
RCS file: /sources/gnash/gnash/server/character.h,v
retrieving revision 1.112
retrieving revision 1.113
diff -u -b -r1.112 -r1.113
--- server/character.h 1 Dec 2007 00:14:59 -0000 1.112
+++ server/character.h 7 Dec 2007 01:33:25 -0000 1.113
@@ -19,7 +19,7 @@
//
//
-/* $Id: character.h,v 1.112 2007/12/01 00:14:59 strk Exp $ */
+/* $Id: character.h,v 1.113 2007/12/07 01:33:25 zoulunkai Exp $ */
#ifndef GNASH_CHARACTER_H
#define GNASH_CHARACTER_H
@@ -58,57 +58,6 @@
namespace gnash {
-/// Informations about timeline instances creation
-//
-/// See:
http://www.gnashdev.org/wiki/index.php/TimelineControl#Timeline_instances
-///
-class TimelineInfo
-{
-
-public:
-
- /// Construct a TimelineInfo
- //
- /// @param depth
- /// Depth at which the instance was placed
- ///
- /// @param frame
- /// Frame number in which the instance was placed (0-based)
- ///
- /// @param replace
- /// True if this object was placed by a REPLACE tag
- /// (see PlaceObject2).
- ///
- TimelineInfo(int depth, int frame, bool replace)
- :
- _depth(depth),
- _frame(frame),
- _replace(replace)
- {
- }
-
-
- /// Return depth of initial placement
- int placedAtDepth() const { return _depth; }
-
- /// Return frame number of initial placement (0-based)
- size_t placedInFrame() const { return _frame; }
-
- /// Return true if this instance replaced an other one at same depth
- bool placedByReplaceTag() const { return _replace; }
-
-private:
-
- /// Original depth
- int _depth;
-
- /// Frame of placement, 0-based
- size_t _frame;
-
- /// Placed by Replace tag ?
- bool _replace;
-};
-
/// Character is a live, stateful instance of a character_def.
//
/// It represents a single active element in a movie.
@@ -148,12 +97,6 @@
/// Build the _target member recursive on parent
std::string computeTargetPath() const;
- /// Timeline info, for timeline instances
- //
- /// For dynamically-created instances this is always NULL
- ///
- std::auto_ptr<TimelineInfo> _timelineInfo;
-
/// The character masking this instance (if any)
character* _mask;
@@ -856,34 +799,12 @@
///
///
bool isDynamic() const {
-
- // WARNING: cannot use _timelinInfo for this, unless
- // we'll provide a TimelineInfo object for top level movies
- // (_level#) and dynamically loaded movies too...
- // which would have no use except implementing
- // isDynamic(). Note that we have NO automated test for this,
but
- // the "Magical Trevor 2" movie aborts due to a call to
getBytesTotal
- // against the root movie, and bug #19844 show the effect with
dynamically
- // loaded movies.
-
- // Anyway, any dynamically created character must NOT have a
- // _timelineInfo object (see setDynamic)
- assert(_dynamicallyCreated ? (_timelineInfo.get() == 0) : 1 );
-
return _dynamicallyCreated;
}
/// Mark this character as dynamically created
- //
- /// "Dynamically created" means created trough ActionScript
- ///
- /// TODO: deprecate this function, all characters should be
- /// dynamic by default Unless setTimelineInfo is called.
- ///
void setDynamic() {
- assert(_timelineInfo.get() == NULL);
_dynamicallyCreated = true;
- //assert(get_depth() > 0);
}
/// \brief
@@ -1158,44 +1079,6 @@
///
std::string getTarget() const;
- /// Set timeline information for this instance
- //
- /// Timeline info should be set only once, right after creation
- /// of a timeline instance. If this function is called twice
- /// Gnash will abort.
- /// Once timeline informations are added to a character, the
- /// character become a "timeline instance". If not timeline info
- /// is available, this is a dynamically-created character.
- /// See isDynamic();
- ///
- /// @param depth
- /// Depth of first placement.
- ///
- /// @param frame
- /// Frame of first placement. 0-based.
- ///
- /// @param replacing
- /// True if this object was placed by a REPLACE tag
- /// (see PlaceObject2).
- ///
- /// NOTE: if we want to compute TimelineInfo records once at
- /// parse time and reuse pointers we'll just need to take
- /// a TimelineInfo pointer as parameter, externally owned.
- /// For now, we'll use a new object for each instance.
- ///
- void setTimelineInfo(int depth, int frame, bool replacing)
- {
- assert(_timelineInfo.get()==NULL); // don't call twice !
- _timelineInfo.reset(new TimelineInfo(depth, frame, replacing));
- }
-
- /// Return timeline information, if this is a timeline instance
- //
- /// For dynamic instances, NULL is returned.
- /// Ownership of the returned object belong to this character.
- ///
- TimelineInfo* getTimelineInfo() { return _timelineInfo.get(); }
-
#ifdef NEW_KEY_LISTENER_LIST_DESIGN
boost::intrusive_ptr<as_function> getUserDefinedEventHandler(const
std::string& name) const;
#endif
Index: server/dlist.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/dlist.cpp,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -b -r1.108 -r1.109
--- server/dlist.cpp 4 Dec 2007 23:50:06 -0000 1.108
+++ server/dlist.cpp 7 Dec 2007 01:33:25 -0000 1.109
@@ -569,136 +569,6 @@
}
-void DisplayList::reset(movie_definition& movieDef, size_t tgtFrame,
sprite_instance& owner)
-{
- testInvariant();
-
- //GNASH_REPORT_FUNCTION;
-
- // 1. Find all "timeline depth" for the target frame, querying the
- // Timeline object in the sprite/movie definition (see implementation
details)
- std::vector<int> save;
- movieDef.getTimelineDepths(tgtFrame, save);
-
-//#define GNASH_DEBUG_TIMELINE 1
-#undef GNASH_DEBUG_TIMELINE
-#ifdef GNASH_DEBUG_TIMELINE
- cout << "Depths found to save: " << endl;
- std::ostream_iterator<int> ostrIter(cout, "," ) ;
- std::copy(save.begin(), save.end(), ostrIter);
- cout << endl;
- cout << "Current DisplayList: " << *this << endl;
-#endif
-
- typedef std::vector<int>::iterator SeekIter;
-
- SeekIter startSeek = save.begin();
- SeekIter endSeek = save.end();
-
- std::vector<DisplayItem> toReinsert;
-
- iterator it = beginNonRemoved(_charsByDepth);
- for (iterator itEnd = _charsByDepth.end(); it != itEnd; )
- {
- testInvariant();
-
- // Make a copy here, in case we're going to replace it
- DisplayItem di = *it;
-
- // Character already unloaded, leave it where it is
- if ( di->isUnloaded() )
- {
- ++it;
- continue;
- }
-
- int di_depth = di->get_depth();
-
- /// We won't scan chars in the dynamic depth zone
- if ( di_depth >= 0 ) break;
-
- /// Always remove non-timeline instances ?
- /// Seems so, at least for duplicateMovieClip
- TimelineInfo* info = di->getTimelineInfo();
- //if ( di->getTimelineInfo() == NULL )
- //if ( di->isDynamic() )
- if ( ! info )
- {
- // Call set_invalidated before changing the DisplayList
- owner.set_invalidated();
-
- // Replace (before calling unload)
- it = _charsByDepth.erase(it);
-
- if ( di->unload() )
- {
- toReinsert.push_back(di);
- }
- else
- {
- di->destroy();
- }
-
- continue;
- }
-
- // remove all shapes and morphs, it should be safe and correct.
- // but suboptimal when considering the invalidated bound.
- // we need to do this in some corner cases.
- if(!di->isActionScriptReferenceable())
- {
- // Call set_invalidated before changing the DisplayList
- owner.set_invalidated();
-
- // TODO: no unload() or destroy() call needed here ? would help GC ?
- // (I guess there can't be any as_value pointing at this
- // if it's not ActionScriptReferenceable after all...)
- //
- it = _charsByDepth.erase(it);
- continue;
- }
-
- /// Only remove if not in the save vector,
- SeekIter match = std::find(startSeek, endSeek, di_depth);
- if( match == save.end())
- {
- // Not to be saved, killing
-
- // Call set_invalidated before changing the DisplayList
- owner.set_invalidated();
-
- // Replace (before calling unload)
- it = _charsByDepth.erase(it);
-
- if ( di->unload() )
- {
- toReinsert.push_back(di);
- }
- else
- {
- di->destroy();
- }
-
- continue;
- }
-
- // To be saved, don't kill
-
- // IFF the 'save' vector is known to be sorted
- // we can let next seek start to next seek item
- // We can't assume this here, unless we request
- // by caller, in the dox.
- //startSeek = ++match;
-
- ++it;
- }
-
- std::for_each(toReinsert.begin(), toReinsert.end(),
- boost::bind(&DisplayList::reinsertRemovedCharacter, this, _1));
-
- testInvariant();
-}
-
bool
DisplayList::unload()
{
Index: server/dlist.h
===================================================================
RCS file: /sources/gnash/gnash/server/dlist.h,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -b -r1.60 -r1.61
--- server/dlist.h 4 Dec 2007 23:50:06 -0000 1.60
+++ server/dlist.h 7 Dec 2007 01:33:26 -0000 1.61
@@ -251,32 +251,6 @@
void add(character* ch, bool replace);
/// \brief
- /// Reset the list removing any static character not supposed to be
there
- /// in the given target frame.
- //
- /// Only instances in static depth are candidates for removal, and not
all
- /// of them are removed. Dynamic instances in static depth zone are
always
- /// removed. Timeline instances are only removed if not supposed to be
- /// there in the target frame. This information is extracted from the
- /// Timeline object associated with the given movie_definition
(movieDef).
- ///
- /// This method implements steps 1 and 2 of 3rd redesign attempt for
- /// display list reconstruction.
- /// See: http://www.gnashdev.org/wiki/index.php/TimelineControl
- ///
- /// @param movieDef
- /// Movie definition from which to extract Timeline information.
- ///
- /// @param targetFrame
- /// 0-based frame number we are jumping back to.
- ///
- /// @param owner
- /// The owner of this DisplayList, for calling set_invalidated() on
it before
- /// making any modification to the list.
- ///
- void reset(movie_definition& movieDef, size_t targetFrame,
sprite_instance& owner);
-
- /// \brief
/// Display the referenced characters.
/// Lower depths are obscured by higher depths.
void display();
Index: server/sprite_instance.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v
retrieving revision 1.405
retrieving revision 1.406
diff -u -b -r1.405 -r1.406
--- server/sprite_instance.cpp 4 Dec 2007 11:45:29 -0000 1.405
+++ server/sprite_instance.cpp 7 Dec 2007 01:33:26 -0000 1.406
@@ -2836,7 +2836,6 @@
else
{
boost::intrusive_ptr<character> ch =
cdef->create_character_instance(this, character_id);
- ch->setTimelineInfo(depth, m_current_frame, false);
if(name)
{
@@ -2903,8 +2902,6 @@
{
boost::intrusive_ptr<character> ch =
cdef->create_character_instance(this, character_id);
- ch->setTimelineInfo(depth, m_current_frame, true);
-
replace_display_object(
ch.get(),
name,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog server/character.h server/dlist...,
Zou Lunkai <=