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: Sandro Santilli
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_start-296-gcf2c372
Date: Fri, 18 Mar 2011 18:31:41 +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  cf2c372b1c56640c6c0de884d5482de0683af9d7 (commit)
      from  4d0e5b557aaba18bc63902d972579ec9718b18f6 (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=cf2c372b1c56640c6c0de884d5482de0683af9d7


commit cf2c372b1c56640c6c0de884d5482de0683af9d7
Author: Sandro Santilli <address@hidden>
Date:   Fri Mar 18 19:30:56 2011 +0100

    Have AGG renderer handle disposed bitmaps and missing bitmaps differently, 
fixing #32833 w/out breaking other things.

diff --git a/libcore/FillStyle.cpp b/libcore/FillStyle.cpp
index 70b97c0..4509a6e 100644
--- a/libcore/FillStyle.cpp
+++ b/libcore/FillStyle.cpp
@@ -182,7 +182,7 @@ const CachedBitmap*
 BitmapFill::bitmap() const
 {
     if (_bitmapInfo) {
-        return  _bitmapInfo->disposed() ? 0 : _bitmapInfo.get();
+        return  _bitmapInfo.get();
     }
     if (!_md) return 0;
     _bitmapInfo = _md->getBitmap(_id);
diff --git a/librender/agg/Renderer_agg_style.h 
b/librender/agg/Renderer_agg_style.h
index 571f9d0..0a1b1f9 100644
--- a/librender/agg/Renderer_agg_style.h
+++ b/librender/agg/Renderer_agg_style.h
@@ -460,14 +460,7 @@ public:
     void add_bitmap(const agg_bitmap_info* bi, const SWFMatrix& mat,
         const SWFCxForm& cx, bool repeat, bool smooth) {
 
-        if (!bi) {
-            // For misc-swfmill.all/missing_bitmap.swf should be 255,0,0,255
-            // For misc-ming.all/BeginBitmapFill.swf should be 0,0,0,0
-            // See https://savannah.gnu.org/bugs/index.php?32833
-            //add_color(agg::rgba8_pre(255,0,0,255));
-            add_color(agg::rgba8_pre(0,0,0,0));
-            return;
-        }
+        assert(bi);
 
         // Tiled
         if (repeat) {
@@ -653,8 +646,20 @@ struct AddStyles : boost::static_visitor<>
 
         const bool tiled = (f.type() == BitmapFill::TILED);
 
-        _sh.add_bitmap(dynamic_cast<const agg_bitmap_info*>(f.bitmap()),
+        const CachedBitmap* bm = f.bitmap(); 
+
+        if (!bm) {
+            // See misc-swfmill.all/missing_bitmap.swf
+            _sh.add_color(agg::rgba8_pre(255,0,0,255));
+        }
+        else if ( bm->disposed() ) {
+            // See misc-ming.all/BeginBitmapFill.swf
+            _sh.add_color(agg::rgba8_pre(0,0,0,0));
+        }
+        else {
+            _sh.add_bitmap(dynamic_cast<const agg_bitmap_info*>(bm),
                 m, _cx, tiled, smooth);
+        }
     }
 
 private:
diff --git a/testsuite/misc-swfmill.all/missing_bitmapTestRunner.cpp 
b/testsuite/misc-swfmill.all/missing_bitmapTestRunner.cpp
index c448fe6..36285c1 100644
--- a/testsuite/misc-swfmill.all/missing_bitmapTestRunner.cpp
+++ b/testsuite/misc-swfmill.all/missing_bitmapTestRunner.cpp
@@ -63,7 +63,7 @@ main(int /*argc*/, char** /*argv*/)
 
 
     // See https://savannah.gnu.org/bugs/index.php?32833
-       xcheck_pixel(100, 100, 20, red, tol);
+       check_pixel(100, 100, 20, red, tol);
        check_pixel(300, 100, 20, white, tol);
        check_pixel(100, 300, 20, white, tol);
 

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

Summary of changes:
 libcore/FillStyle.cpp                              |    2 +-
 librender/agg/Renderer_agg_style.h                 |   23 ++++++++++++-------
 .../misc-swfmill.all/missing_bitmapTestRunner.cpp  |    2 +-
 3 files changed, 16 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

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