gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-


From: Sandro Santilli
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-250-ge0057c0
Date: Mon, 11 Apr 2011 10:55:13 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, master has been updated
       via  e0057c027498e444e2dcf507d06db0fc7acbba68 (commit)
       via  dbc1dfcbce4adc41cf2d1e166213977af6368aba (commit)
      from  31f22043a830621ff3c75fbb98bccaf21cb13e99 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=e0057c027498e444e2dcf507d06db0fc7acbba68


commit e0057c027498e444e2dcf507d06db0fc7acbba68
Author: Sandro Santilli <address@hidden>
Date:   Sat Apr 9 22:45:17 2011 +0200

    expect the new success in invalidated bounds detection

diff --git a/testsuite/misc-ming.all/loop/loop_test-Runner.cpp 
b/testsuite/misc-ming.all/loop/loop_test-Runner.cpp
index 54fd49d..29e4e0e 100644
--- a/testsuite/misc-ming.all/loop/loop_test-Runner.cpp
+++ b/testsuite/misc-ming.all/loop/loop_test-Runner.cpp
@@ -126,7 +126,7 @@ main(int /*argc*/, char** /*argv*/)
                        // visually, it seems so, but loop-back is too complex
                        // to be sure (ie: xtrace window text might be reset or 
something)
                        // I checked that it's not resetDisplayList 
invalidating it...
-                       xcheck( tester.getInvalidatedRanges().isNull() );
+                       check( tester.getInvalidatedRanges().isNull() );
                }
                else // we did nothing here...
                {

http://git.savannah.gnu.org/cgit//commit/?id=dbc1dfcbce4adc41cf2d1e166213977af6368aba


commit dbc1dfcbce4adc41cf2d1e166213977af6368aba
Author: Sandro Santilli <address@hidden>
Date:   Sat Apr 9 21:37:27 2011 +0200

    Do not invalidate MovieClip on timeline rewind unless DisplayList really 
changes. Takes CPU use down in many cases (seen it from 100% to 8%)

diff --git a/libcore/DisplayList.cpp b/libcore/DisplayList.cpp
index 9936f97..8a7aa9f 100644
--- a/libcore/DisplayList.cpp
+++ b/libcore/DisplayList.cpp
@@ -729,7 +729,7 @@ DisplayList::add_invalidated_bounds(InvalidatedRanges& 
ranges, bool force)
 }
 
 void
-DisplayList::mergeDisplayList(DisplayList& newList)
+DisplayList::mergeDisplayList(DisplayList& newList, DisplayObject& o)
 {
     testInvariant();
 
@@ -760,6 +760,7 @@ DisplayList::mergeDisplayList(DisplayList& newList)
                 ++itOld;
                 // unload the DisplayObject if it's in static zone(-16384,0)
                 if (depthOld < 0) {
+                    o.set_invalidated();
                     _charsByDepth.erase(itOldBackup);
 
                      if (chOld->unload()) reinsertRemovedCharacter(chOld);
@@ -781,6 +782,7 @@ DisplayList::mergeDisplayList(DisplayList& newList)
                         !isReferenceable(*chOld)) {
                     // replace the DisplayObject in old list with
                     // corresponding DisplayObject in new list
+                    o.set_invalidated();
                     _charsByDepth.insert(itOldBackup, *itNewBackup);
                     _charsByDepth.erase(itOldBackup);
                     
@@ -807,6 +809,7 @@ DisplayList::mergeDisplayList(DisplayList& newList)
             // depth in old list is empty, but occupied in new list.
             ++itNew;
             // add the new DisplayObject to the old list.
+            o.set_invalidated();
             _charsByDepth.insert(itOldBackup, *itNewBackup);
         }
 
@@ -820,6 +823,7 @@ DisplayList::mergeDisplayList(DisplayList& newList)
     while ((itOld != itOldEnd) && ((*itOld)->get_depth() < 0)) {
 
         DisplayObject* chOld = *itOld;
+        o.set_invalidated();
         itOld = _charsByDepth.erase(itOld);
 
         if (chOld->unload()) reinsertRemovedCharacter(chOld);
@@ -829,7 +833,10 @@ DisplayList::mergeDisplayList(DisplayList& newList)
     // step3(only required if scanning of old list finished earlier in step1).
     // continue to scan the new list.
     // add remaining DisplayObjects directly.
-    if (itNew != itNewEnd) _charsByDepth.insert(itOld, itNew, itNewEnd);
+    if (itNew != itNewEnd) {
+        o.set_invalidated();
+        _charsByDepth.insert(itOld, itNew, itNewEnd);
+    }
 
     // step4.
     // Copy all unloaded DisplayObjects from the new display list to the
@@ -844,6 +851,7 @@ DisplayList::mergeDisplayList(DisplayList& newList)
                 std::find_if(_charsByDepth.begin(), _charsByDepth.end(),
                     boost::bind(std::not2(DepthLessThan()), _1, depthNew));
             
+            o.set_invalidated();
             _charsByDepth.insert(it, *itNew);
         }
     }
diff --git a/libcore/DisplayList.h b/libcore/DisplayList.h
index 7a36cfe..9b2cb73 100644
--- a/libcore/DisplayList.h
+++ b/libcore/DisplayList.h
@@ -287,9 +287,11 @@ public:
        ///
        int getNextHighestDepth() const;
        
-       /// \brief
-       /// merge the given display list
-       void mergeDisplayList(DisplayList& newList);
+       /// Merge the given display list
+    //
+    /// Call set_invalidated on the given DisplayObject if this list changes
+    ///
+       void mergeDisplayList(DisplayList& newList, DisplayObject& o);
 
        bool operator==(const DisplayList& other) const {
         return _charsByDepth == other._charsByDepth;
diff --git a/libcore/MovieClip.cpp b/libcore/MovieClip.cpp
index fe047e0..8c80811 100644
--- a/libcore/MovieClip.cpp
+++ b/libcore/MovieClip.cpp
@@ -936,11 +936,6 @@ MovieClip::restoreDisplayList(size_t tgtFrame)
     //             for jump-forwards would do
     assert(tgtFrame <= _currentFrame);
 
-    // Just invalidate this DisplayObject before jumping back.
-    // Should be optimized, but the invalidating model is not clear enough,
-    // and there are some old questions spreading the source files.
-    set_invalidated();
-
     DisplayList tmplist;
     for (size_t f = 0; f < tgtFrame; ++f) {
         _currentFrame = f;
@@ -952,7 +947,7 @@ MovieClip::restoreDisplayList(size_t tgtFrame)
     executeFrameTags(tgtFrame, tmplist, SWF::ControlTag::TAG_DLIST |
                                         SWF::ControlTag::TAG_ACTION);
 
-    _displayList.mergeDisplayList(tmplist);
+    _displayList.mergeDisplayList(tmplist, *this);
 }
 
 // 0-based frame number !

-----------------------------------------------------------------------

Summary of changes:
 libcore/DisplayList.cpp                           |   12 ++++++++++--
 libcore/DisplayList.h                             |    8 +++++---
 libcore/MovieClip.cpp                             |    7 +------
 testsuite/misc-ming.all/loop/loop_test-Runner.cpp |    2 +-
 4 files changed, 17 insertions(+), 12 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

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