gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog testsuite/MovieTester.cpp tests...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog testsuite/MovieTester.cpp tests...
Date: Wed, 06 Dec 2006 09:27:31 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  06/12/06 09:27:31

Modified files:
        .              : ChangeLog 
        testsuite      : MovieTester.cpp MovieTester.h 

Log message:
                * testsuite/MovieTester.{cpp,h}: add getInvalidatedBounds 
function.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.1863&r2=1.1864
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/MovieTester.cpp?cvsroot=gnash&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/MovieTester.h?cvsroot=gnash&r1=1.6&r2=1.7

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.1863
retrieving revision 1.1864
diff -u -b -r1.1863 -r1.1864
--- ChangeLog   6 Dec 2006 08:46:50 -0000       1.1863
+++ ChangeLog   6 Dec 2006 09:27:31 -0000       1.1864
@@ -1,5 +1,6 @@
 2006-12-06 Sandro Santilli <address@hidden>
 
+       * testsuite/MovieTester.{cpp,h}: add getInvalidatedBounds function.
        * libgeometry/Range2d.h (Intersect): removed spurious code.
        * server/rect.h: added getRange() method.
 

Index: testsuite/MovieTester.cpp
===================================================================
RCS file: /sources/gnash/gnash/testsuite/MovieTester.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- testsuite/MovieTester.cpp   29 Nov 2006 08:23:45 -0000      1.12
+++ testsuite/MovieTester.cpp   6 Dec 2006 09:27:31 -0000       1.13
@@ -33,6 +33,13 @@
 #include <string>
 #include <memory> // for auto_ptr
 
+#define SHOW_INVALIDATED_BOUNDS_ON_ADVANCE 1
+
+#ifdef SHOW_INVALIDATED_BOUNDS_ON_ADVANCE
+#include <sstream>
+#endif
+
+
 namespace gnash {
 
 MovieTester::MovieTester(const std::string& url)
@@ -83,6 +90,13 @@
 MovieTester::advance() 
 {
        _movie->advance(1.0);
+#ifdef SHOW_INVALIDATED_BOUNDS_ON_ADVANCE
+       geometry::Range2d<float> invalidatedbounds = getInvalidatedBounds();
+       std::stringstream ss;
+       ss << "frame " << _movie->get_current_frame() << ") Invalidated bounds 
" << invalidatedbounds;
+       gnash::LogFile& dbglogfile = gnash::LogFile::getDefaultInstance();
+       dbglogfile << ss.str().c_str() << std::endl;
+#endif
 }
 
 const character*
@@ -125,4 +139,13 @@
        return _movie_root->isMouseOverActiveEntity();
 }
 
+geometry::Range2d<float>
+MovieTester::getInvalidatedBounds() const
+{
+       rect ret;
+       _movie_root->clear_invalidated();
+       _movie_root->get_invalidated_bounds(&ret, false);
+       return ret.getRange();
+}
+
 } // namespace gnash

Index: testsuite/MovieTester.h
===================================================================
RCS file: /sources/gnash/gnash/testsuite/MovieTester.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- testsuite/MovieTester.h     29 Oct 2006 18:34:17 -0000      1.6
+++ testsuite/MovieTester.h     6 Dec 2006 09:27:31 -0000       1.7
@@ -20,6 +20,8 @@
 #ifndef _GNASH_MOVIETESTER_H
 #define _GNASH_MOVIETESTER_H
 
+#include "Range2d.h"
+
 #include <memory> // for auto_ptr
 #include <string> // for auto_ptr
 
@@ -51,6 +53,12 @@
        /// Advance the movie by one frame
        void advance();
 
+       /// Return the invalidated bounds in TWIPS
+       //
+       /// This is to debug/test partial rendering
+       ///
+       geometry::Range2d<float> getInvalidatedBounds() const;
+
        /// Find a character in the display list of a sprite by name.
        //
        /// Return NULL if there's no character with that name in




reply via email to

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