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_start-


From: Benjamin Wolsey
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_start-76-g77062cb
Date: Thu, 17 Feb 2011 14:30:25 +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  77062cb8ab0c8679c6bf16869bb8e2a42e1e554e (commit)
       via  8639fcff79154861e872a2f1389ef77607f1a453 (commit)
      from  75f66923c34e36913bb88f5ac0ac4745f1d70fd2 (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=77062cb8ab0c8679c6bf16869bb8e2a42e1e554e


commit 77062cb8ab0c8679c6bf16869bb8e2a42e1e554e
Author: Benjamin Wolsey <address@hidden>
Date:   Thu Feb 17 15:31:42 2011 +0100

    Fix tests using dump().

diff --git a/testsuite/misc-ming.all/DragDropTestRunner.cpp 
b/testsuite/misc-ming.all/DragDropTestRunner.cpp
index 7ae1646..24eed04 100644
--- a/testsuite/misc-ming.all/DragDropTestRunner.cpp
+++ b/testsuite/misc-ming.all/DragDropTestRunner.cpp
@@ -111,7 +111,7 @@ main(int /*argc*/, char** /*argv*/)
                {
                        check(!"loadTarget was never loaded");
                        cerr << "Root display list is: " << endl;
-                       root->getDisplayList().dump();
+            std::cerr << root->getDisplayList();
                        exit(EXIT_FAILURE);
                }
 
diff --git a/testsuite/misc-ming.all/masks_testrunner.cpp 
b/testsuite/misc-ming.all/masks_testrunner.cpp
index 4d5b9e8..cb9f43a 100644
--- a/testsuite/misc-ming.all/masks_testrunner.cpp
+++ b/testsuite/misc-ming.all/masks_testrunner.cpp
@@ -64,7 +64,7 @@ main(int /*argc*/, char** /*argv*/)
        check_equals(root->getPlayState(), MovieClip::PLAYSTATE_STOP);
        check_equals(root->get_current_frame(), 1); // 0-based
        check_equals(root->getDisplayList().size(), 9);
-       root->getDisplayList().dump();
+    std::cout << root->getDisplayList() << "\n";
        check( tester.findDisplayItemByName(*root, "staticmc2") );
        check( tester.findDisplayItemByName(*root, "staticmc3") );
        check( tester.findDisplayItemByName(*root, "staticmc4") );

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


commit 8639fcff79154861e872a2f1389ef77607f1a453
Author: Benjamin Wolsey <address@hidden>
Date:   Thu Feb 17 14:21:42 2011 +0100

    Not all DisplayObjects have an associated as_object,
    so fix the ostream operator<< and drop the dump() function.
    Fixes crash while logging.

diff --git a/libcore/DisplayList.cpp b/libcore/DisplayList.cpp
index 6d2a14c..e9a2cff 100644
--- a/libcore/DisplayList.cpp
+++ b/libcore/DisplayList.cpp
@@ -15,23 +15,26 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA    02110-1301    
USA
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-#include "smart_ptr.h" 
 #include "DisplayList.h"
-#include "log.h"
-#include "Renderer.h"
-#include "StringPredicates.h"
-#include "MovieClip.h"
-#include "ObjectURI.h"
 
-#include <typeinfo>
 #include <ostream>
+#include <sstream>
 #include <algorithm>
 #include <stack>
 #include <cassert>
 #include <boost/bind.hpp>
+#include <boost/format.hpp>
+
+#include "smart_ptr.h" 
+#include "log.h"
+#include "Renderer.h"
+#include "StringPredicates.h"
+#include "MovieClip.h"
+#include "ObjectURI.h"
+#include "utility.h"
 
 namespace gnash {
 
@@ -681,28 +684,6 @@ DisplayList::omit_display()
     }
 }
 
-void
-DisplayList::dump() const
-{
-    if (_charsByDepth.empty()) return;
-
-    string_table& st = getStringTable(*getObject(_charsByDepth.front()));
-    ObjectURI::Logger l(st);
-
-    int num=0;
-    for (const_iterator it = _charsByDepth.begin(),
-            endIt = _charsByDepth.end(); it != endIt; ++it) {
-
-        const DisplayObject* dobj = *it;
-        log_debug(_("Item %d(%s) at depth %d (char name %s, type %s)"
-                    "Destroyed: %s, unloaded: %s"),
-            num, dobj, dobj->get_depth(), l.debug(dobj->get_name()), 
typeName(*dobj),
-            dobj->isDestroyed(), dobj->unloaded());
-        num++;
-    }
-}
-
-
 void 
 DisplayList::add_invalidated_bounds(InvalidatedRanges& ranges, bool force)
 {
@@ -1048,20 +1029,29 @@ dlistTagsEffectiveZoneEnd(DisplayList::container_type& 
c)
 std::ostream&
 operator<<(std::ostream& os, const DisplayList& dl)
 {
-    os << "By depth: ";
 
     if (dl._charsByDepth.empty()) return os;
 
-    string_table& st = getStringTable(*getObject(dl._charsByDepth.front()));
-    ObjectURI::Logger l(st);
+    os << "DisplayList size " << dl._charsByDepth.size() << "\n";
+
+    size_t count = 0;
 
     for (DisplayList::const_iterator it = dl._charsByDepth.begin(),
-            itEnd = dl._charsByDepth.end(); it != itEnd; ++it) {
+            itEnd = dl._charsByDepth.end(); it != itEnd; ++it, ++count) {
+
+        const DisplayObject* dobj = *it;
 
-        const DisplayObject* item = *it; 
-        if (it != dl._charsByDepth.begin()) os << " | ";
-        os << " name:" << l.debug(item->get_name())
-           << " depth:" << item->get_depth();
+        boost::format fmt = boost::format(
+            "Item %1% (%2%) at depth %3% (type %4%) "
+            "Destroyed: %5%, unloaded: %6%")
+            % count 
+            % dobj 
+            % dobj->get_depth() 
+            % typeName(*dobj)
+            % boost::io::group(std::boolalpha, dobj->isDestroyed())
+            % boost::io::group(std::boolalpha, dobj->unloaded());
+
+        os << fmt.str() << std::endl;
     }
 
     return os;
diff --git a/libcore/DisplayList.h b/libcore/DisplayList.h
index 3cdfe77..307ac25 100644
--- a/libcore/DisplayList.h
+++ b/libcore/DisplayList.h
@@ -288,9 +288,6 @@ public:
        template <class V> inline void visitAll(V& visitor);
        template <class V> inline void visitAll(V& visitor) const;
 
-       /// dump list to logfile/stderr
-       void dump() const;
-
     /// Like DisplayObject_instance::add_invalidated_bounds() this method 
calls the
     /// method with the same name of all childs.       
        void add_invalidated_bounds(InvalidatedRanges& ranges, bool force);     

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

Summary of changes:
 libcore/DisplayList.cpp                        |   66 ++++++++++--------------
 libcore/DisplayList.h                          |    3 -
 testsuite/misc-ming.all/DragDropTestRunner.cpp |    2 +-
 testsuite/misc-ming.all/masks_testrunner.cpp   |    2 +-
 4 files changed, 30 insertions(+), 43 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

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