gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog server/movie_root.cpp server/mo...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog server/movie_root.cpp server/mo...
Date: Wed, 30 Apr 2008 14:29:38 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  08/04/30 14:29:38

Modified files:
        .              : ChangeLog 
        server         : movie_root.cpp movie_root.h 
        testsuite/misc-swfmill.all: Makefile.am backgroundTestRunner.cpp 

Log message:
        * server/movie_root.{cpp,h}: allow setting background color
          only once (till the stage is reset by clear).
          TODO: check if background can change when loading something
          with different background into _level0.
        * testsuite/misc-swfmill.all/Makefile.am: fix abs_builddir
        * testsuite/misc-swfmill.all/backgroundTestRunner.cpp: use TGTDIR
          (not SRCDIR) to find the swf, use a tolerance of 15 to compare
          color (AGG_RGB555 gives 240,0,0 for a red!), success of the
          test (related to the change in movie_root).

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.6463&r2=1.6464
http://cvs.savannah.gnu.org/viewcvs/gnash/server/movie_root.cpp?cvsroot=gnash&r1=1.190&r2=1.191
http://cvs.savannah.gnu.org/viewcvs/gnash/server/movie_root.h?cvsroot=gnash&r1=1.128&r2=1.129
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-swfmill.all/Makefile.am?cvsroot=gnash&r1=1.17&r2=1.18
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-swfmill.all/backgroundTestRunner.cpp?cvsroot=gnash&r1=1.1&r2=1.2

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.6463
retrieving revision 1.6464
diff -u -b -r1.6463 -r1.6464
--- ChangeLog   30 Apr 2008 13:34:29 -0000      1.6463
+++ ChangeLog   30 Apr 2008 14:29:37 -0000      1.6464
@@ -1,5 +1,17 @@
 2008-04-30 Sandro Santilli <address@hidden>
 
+       * server/movie_root.{cpp,h}: allow setting background color
+         only once (till the stage is reset by clear).
+         TODO: check if background can change when loading something
+         with different background into _level0.
+       * testsuite/misc-swfmill.all/Makefile.am: fix abs_builddir
+       * testsuite/misc-swfmill.all/backgroundTestRunner.cpp: use TGTDIR
+         (not SRCDIR) to find the swf, use a tolerance of 15 to compare
+         color (AGG_RGB555 gives 240,0,0 for a red!), success of the
+         test (related to the change in movie_root).
+
+2008-04-30 Sandro Santilli <address@hidden>
+
        * server/swf/SetBackgroundColorTag.h: update to match 
          change in ::execute signature
        * testsuite/misc-swfmill.all/: Makefile.am, background.xml,

Index: server/movie_root.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/movie_root.cpp,v
retrieving revision 1.190
retrieving revision 1.191
diff -u -b -r1.190 -r1.191
--- server/movie_root.cpp       29 Apr 2008 14:47:27 -0000      1.190
+++ server/movie_root.cpp       30 Apr 2008 14:29:38 -0000      1.191
@@ -75,6 +75,7 @@
        m_viewport_width(1),
        m_viewport_height(1),
        m_background_color(255, 255, 255, 255),
+        m_background_color_set(false),
        m_timer(0.0f),
        m_mouse_x(0),
        m_mouse_y(0),
@@ -408,6 +409,11 @@
 void
 movie_root::clear()
 {
+       // reset background color, to allow 
+       // next load to set it again.
+       m_background_color.set(255,255,255,255);
+       m_background_color_set = false;
+
        // wipe out live chars
        _liveChars.clear();
 
@@ -1904,6 +1910,9 @@
 {
        //GNASH_REPORT_FUNCTION;
 
+       if ( m_background_color_set ) return;
+       m_background_color_set = true;
+
         if ( m_background_color != color )
        {
                setInvalidated();

Index: server/movie_root.h
===================================================================
RCS file: /sources/gnash/gnash/server/movie_root.h,v
retrieving revision 1.128
retrieving revision 1.129
diff -u -b -r1.128 -r1.129
--- server/movie_root.h 29 Apr 2008 08:53:36 -0000      1.128
+++ server/movie_root.h 30 Apr 2008 14:29:38 -0000      1.129
@@ -851,6 +851,8 @@
     int         m_viewport_width, m_viewport_height;
 
     rgba        m_background_color;
+    bool       m_background_color_set;
+
     float       m_timer;
     int         m_mouse_x, m_mouse_y, m_mouse_buttons;
     void *      m_userdata;

Index: testsuite/misc-swfmill.all/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-swfmill.all/Makefile.am,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- testsuite/misc-swfmill.all/Makefile.am      30 Apr 2008 13:34:29 -0000      
1.17
+++ testsuite/misc-swfmill.all/Makefile.am      30 Apr 2008 14:29:38 -0000      
1.18
@@ -19,7 +19,7 @@
 AUTOMAKE_OPTIONS = dejagnu -Wno-portability
 
 abs_topbuilddir=$(shell cd $(top_builddir); pwd)
-abs_builddir=$(shell cd $(top_builddir)/testsuite/misc-ming.all; pwd)
+abs_builddir=$(shell cd $(top_builddir)/testsuite/misc-swfmill.all; pwd)
 
 ## Self-contained XML tests
 SC_XMLTESTS =                  \

Index: testsuite/misc-swfmill.all/backgroundTestRunner.cpp
===================================================================
RCS file: 
/sources/gnash/gnash/testsuite/misc-swfmill.all/backgroundTestRunner.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- testsuite/misc-swfmill.all/backgroundTestRunner.cpp 30 Apr 2008 13:34:30 
-0000      1.1
+++ testsuite/misc-swfmill.all/backgroundTestRunner.cpp 30 Apr 2008 14:29:38 
-0000      1.2
@@ -37,7 +37,7 @@
 int
 main(int /*argc*/, char** /*argv*/)
 {
-       string filename = string(SRCDIR) + string("/") + string(INPUT_FILENAME);
+       string filename = string(TGTDIR) + string("/") + string(INPUT_FILENAME);
        auto_ptr<MovieTester> t;
 
        gnash::LogFile& dbglogfile = gnash::LogFile::getDefaultInstance();
@@ -64,20 +64,25 @@
        check_equals(root->get_frame_count(), 2);
        check_equals(root->get_current_frame(), 0);
 
-       xcheck_pixel(60, 60, 50, red, 1);
-       xcheck_pixel(60, 400, 50, red, 1);
-       xcheck_pixel(600, 400, 50, red, 1);
-       xcheck_pixel(600, 60, 50, red, 1);
-       xcheck_pixel(320, 240, 50, red, 1);
+       // error tolerance
+       // WARNING ! AGG_RGB555 reports red as 240,0,0 !!!!
+       // it's really annoying ... (UdoG: help ?)
+       int tol = 15;
+
+       check_pixel(60, 60, 50, red, tol);
+       check_pixel(60, 400, 50, red, tol);
+       check_pixel(600, 400, 50, red, tol);
+       check_pixel(600, 60, 50, red, tol);
+       check_pixel(320, 240, 50, red, tol);
 
        tester.advance();
 
        check_equals(root->get_current_frame(), 1);
 
-       xcheck_pixel(60, 60, 50, red, 1);
-       xcheck_pixel(60, 400, 50, red, 1);
-       xcheck_pixel(600, 400, 50, red, 1);
-       xcheck_pixel(600, 60, 50, red, 1);
-       xcheck_pixel(320, 240, 50, red, 1);
+       check_pixel(60, 60, 50, red, tol);
+       check_pixel(60, 400, 50, red, tol);
+       check_pixel(600, 400, 50, red, tol);
+       check_pixel(600, 60, 50, red, tol);
+       check_pixel(320, 240, 50, red, tol);
 }
 




reply via email to

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