gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog server/BitmapMovieInstance.cpp ...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog server/BitmapMovieInstance.cpp ...
Date: Mon, 07 Jan 2008 16:47:26 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  08/01/07 16:47:25

Modified files:
        .              : ChangeLog 
        server         : BitmapMovieInstance.cpp fill_style.cpp 
                         fill_style.h 
        server/parser  : BitmapMovieDefinition.cpp 
        testsuite/actionscript.all: MovieClipLoader.as 
        testsuite/swfdec: PASSING 

Log message:
        Fix size computation for loaded jpeg files.
        This fixes the top movie on youtube (active_sharing.swf)

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5332&r2=1.5333
http://cvs.savannah.gnu.org/viewcvs/gnash/server/BitmapMovieInstance.cpp?cvsroot=gnash&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/gnash/server/fill_style.cpp?cvsroot=gnash&r1=1.19&r2=1.20
http://cvs.savannah.gnu.org/viewcvs/gnash/server/fill_style.h?cvsroot=gnash&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/BitmapMovieDefinition.cpp?cvsroot=gnash&r1=1.13&r2=1.14
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/MovieClipLoader.as?cvsroot=gnash&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/swfdec/PASSING?cvsroot=gnash&r1=1.78&r2=1.79

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5332
retrieving revision 1.5333
diff -u -b -r1.5332 -r1.5333
--- ChangeLog   7 Jan 2008 16:23:00 -0000       1.5332
+++ ChangeLog   7 Jan 2008 16:47:24 -0000       1.5333
@@ -1,3 +1,16 @@
+2008-01-07 Sandro Santilli <address@hidden>
+
+       * server/fill_style.{cpp,h}: add a matrix argument
+         to the constructor taking a bitmap definition.
+       * server/parser/BitmapMovieDefinition.cpp: appropriately
+         scale bitmap fill rather then the drawn shape.
+       * server/BitmapMovieInstance.cpp: don't scale the character,
+         it's the fill that needed scaling.
+       * testsuite/swfdec/PASSING: moviecliploader-known-image-size-{7,8}.swf
+         succeed.
+       * testsuite/actionscript.all/MovieClipLoader.as: checks for jpeg size
+         succeed.
+
 2008-01-07 Benjamin Wolsey <address@hidden>
 
        * gui/gnash.cpp, gui/Player.h: drop -b option.

Index: server/BitmapMovieInstance.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/BitmapMovieInstance.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- server/BitmapMovieInstance.cpp      1 Jul 2007 10:54:18 -0000       1.10
+++ server/BitmapMovieInstance.cpp      7 Jan 2008 16:47:25 -0000       1.11
@@ -35,7 +35,7 @@
        movie_instance(def, NULL)
 {
   matrix mat;
-  mat.concatenate_scale(20.0);
+       //mat.concatenate_scale(20.0);
   
        // We need to assign a character id to the instance, or an assertion
        // will fail in character.cpp (parent==NULL || id != -1)

Index: server/fill_style.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/fill_style.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- server/fill_style.cpp       3 Jan 2008 12:36:32 -0000       1.19
+++ server/fill_style.cpp       7 Jan 2008 16:47:25 -0000       1.20
@@ -524,10 +524,12 @@
   return m_gradients[index];
 }
 
-fill_style::fill_style(bitmap_character_def* bitmap)
+fill_style::fill_style(bitmap_character_def* bitmap, const matrix& mat)
+       :
+       m_type(SWF::FILL_CLIPPED_BITMAP),
+       m_bitmap_character(bitmap),
+       m_bitmap_matrix(mat)
 {
-       m_bitmap_character = bitmap;
-       m_type = SWF::FILL_CLIPPED_BITMAP;
 }
 
 void

Index: server/fill_style.h
===================================================================
RCS file: /sources/gnash/gnash/server/fill_style.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- server/fill_style.h 2 Jan 2008 19:08:31 -0000       1.14
+++ server/fill_style.h 7 Jan 2008 16:47:25 -0000       1.15
@@ -17,7 +17,7 @@
 
 // Based on work of Thatcher Ulrich <address@hidden> 2003
 
-/* $Id: fill_style.h,v 1.14 2008/01/02 19:08:31 strk Exp $ */
+/* $Id: fill_style.h,v 1.15 2008/01/07 16:47:25 strk Exp $ */
 
 #ifndef GNASH_FILL_STYLE_H
 #define GNASH_FILL_STYLE_H
@@ -72,8 +72,15 @@
        /// use by bitmap shape character.
        ///
        /// TODO: use a subclass for this
+       /// TODO: provide a setBitmap, for consisteny with other setType() 
methods
        ///
-       fill_style(bitmap_character_def* bitmap);
+       /// @param bitmap
+       ///     The bitmap character definition to use with this bitmap fill.
+       ///
+       /// @param mat
+       ///     The matrix to apply to the bitmap.
+       ///
+       fill_style(bitmap_character_def* bitmap, const matrix& mat);
 
        void setSolid(const rgba& color);
 

Index: server/parser/BitmapMovieDefinition.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/parser/BitmapMovieDefinition.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- server/parser/BitmapMovieDefinition.cpp     17 Sep 2007 12:21:47 -0000      
1.13
+++ server/parser/BitmapMovieDefinition.cpp     7 Jan 2008 16:47:25 -0000       
1.14
@@ -50,7 +50,10 @@
 
        // Add the bitmap fill style (fill style 0)
 
-       fill_style bmFill(_bitmap.get());
+       matrix mat;
+       //mat.concatenate_scale(1.0/20.0);
+       mat.set_scale(1.0/20.0, 1.0/20.0); // bitmap fills get matrix reversed
+       fill_style bmFill(_bitmap.get(), mat);
        size_t fillLeft = _shapedef->add_fill_style(bmFill);
 
        // Define a rectangle filled with the bitmap style
@@ -58,8 +61,8 @@
        // We use one twip for each pixel in the image
        // The character will be scaled * 20
        // when placed in BitmapMovieInstance's DisplayList
-       float w = _framesize.width()/20;
-       float h = _framesize.height()/20;
+       float w = _framesize.width(); // /20;
+       float h = _framesize.height(); // /20;
 
        log_msg(_("Creating a shape_definition wrapping a %g x %g bitmap"), w, 
h);
 

Index: testsuite/actionscript.all/MovieClipLoader.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/MovieClipLoader.as,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- testsuite/actionscript.all/MovieClipLoader.as       7 Jan 2008 15:21:21 
-0000       1.12
+++ testsuite/actionscript.all/MovieClipLoader.as       7 Jan 2008 16:47:25 
-0000       1.13
@@ -21,7 +21,7 @@
 // compile this test case with Ming makeswf, and then
 // execute it like this gnash -1 -r 0 -v out.swf
 
-rcsid="$Id: MovieClipLoader.as,v 1.12 2008/01/07 15:21:21 strk Exp $";
+rcsid="$Id: MovieClipLoader.as,v 1.13 2008/01/07 16:47:25 strk Exp $";
 
 #include "check.as"
 
@@ -254,8 +254,8 @@
                }
                // NOTE: these two tests show the bug preventing
                //       YouTube active_sharing.swf movie from working
-               xcheck_equals(target._width, 170); 
-               xcheck_equals(target._height, 170);
+               check_equals(target._width, 170); 
+               check_equals(target._height, 170);
        }
 
        //note("target.var1: "+target.var1);

Index: testsuite/swfdec/PASSING
===================================================================
RCS file: /sources/gnash/gnash/testsuite/swfdec/PASSING,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -b -r1.78 -r1.79
--- testsuite/swfdec/PASSING    11 Dec 2007 15:52:22 -0000      1.78
+++ testsuite/swfdec/PASSING    7 Jan 2008 16:47:25 -0000       1.79
@@ -295,6 +295,8 @@
 moviecliploader-constructor-6.swf:e50f068ebde835d503c43ae1fcaf4371
 moviecliploader-getprogress-5.swf:0d58d1e3762e678c27f38309c34906ec
 moviecliploader-getprogress-6.swf:80231ce07d7197f269532a7d9f920c06
+moviecliploader-known-image-size-7.swf:62f495b0354dbe7dcb80ef256392843a
+moviecliploader-known-image-size-8.swf:32aaecb1e0735b6c94e980d21753e698
 moviecliploader-unknown-format-5.swf:b28db9ff343a9487fbb90adfc46725b9
 moviecliploader-unknown-format-6.swf:08cab100a05f91617b55f30492ff814d
 name.swf:88260c60778020b3c5610a8fa804b979




reply via email to

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