[Swfdec-commits] 4 commits - swfdec/swfdec_renderer.c test/image

Benjamin Otte company at kemper.freedesktop.org
Thu Nov 20 03:06:02 PST 2008


 swfdec/swfdec_renderer.c                               |    3 ++-
 test/image/Makefile.am                                 |    9 +++++++++
 test/image/regression-0.9.2-transform-opaque-5.swf     |binary
 test/image/regression-0.9.2-transform-opaque-5.swf.png |binary
 test/image/regression-0.9.2-transform-opaque-6.swf     |binary
 test/image/regression-0.9.2-transform-opaque-6.swf.png |binary
 test/image/regression-0.9.2-transform-opaque-7.swf     |binary
 test/image/regression-0.9.2-transform-opaque-7.swf.png |binary
 test/image/regression-0.9.2-transform-opaque-8.swf     |binary
 test/image/regression-0.9.2-transform-opaque-8.swf.png |binary
 test/image/regression-0.9.2-transform-opaque.as        |    8 ++++++++
 11 files changed, 19 insertions(+), 1 deletion(-)

New commits:
commit 3deb6222cb5fc092e9838c598592e019aaa4b494
Author: Benjamin Otte <otte at gnome.org>
Date:   Thu Nov 20 12:04:47 2008 +0100

    add a test for the just-fixed regression

diff --git a/test/image/Makefile.am b/test/image/Makefile.am
index 52e035d..3d0be09 100644
--- a/test/image/Makefile.am
+++ b/test/image/Makefile.am
@@ -416,6 +416,15 @@ EXTRA_DIST = \
 	placeobject-ratio.swf \
 	placeobject-ratio.swf.png \
 	placeobject-ratio.xml \
+	regression-0.9.2-transform-opaque-5.swf \
+	regression-0.9.2-transform-opaque-5.swf.png \
+	regression-0.9.2-transform-opaque-6.swf \
+	regression-0.9.2-transform-opaque-6.swf.png \
+	regression-0.9.2-transform-opaque-7.swf \
+	regression-0.9.2-transform-opaque-7.swf.png \
+	regression-0.9.2-transform-opaque-8.swf \
+	regression-0.9.2-transform-opaque-8.swf.png \
+	regression-0.9.2-transform-opaque.as \
 	replace.c \
 	replace-button-button-5.swf \
 	replace-button-button-5.swf.png \
diff --git a/test/image/regression-0.9.2-transform-opaque-5.swf b/test/image/regression-0.9.2-transform-opaque-5.swf
new file mode 100644
index 0000000..2477fe0
Binary files /dev/null and b/test/image/regression-0.9.2-transform-opaque-5.swf differ
diff --git a/test/image/regression-0.9.2-transform-opaque-5.swf.png b/test/image/regression-0.9.2-transform-opaque-5.swf.png
new file mode 100644
index 0000000..1c191a2
Binary files /dev/null and b/test/image/regression-0.9.2-transform-opaque-5.swf.png differ
diff --git a/test/image/regression-0.9.2-transform-opaque-6.swf b/test/image/regression-0.9.2-transform-opaque-6.swf
new file mode 100644
index 0000000..b28ff14
Binary files /dev/null and b/test/image/regression-0.9.2-transform-opaque-6.swf differ
diff --git a/test/image/regression-0.9.2-transform-opaque-6.swf.png b/test/image/regression-0.9.2-transform-opaque-6.swf.png
new file mode 100644
index 0000000..7df1a4b
Binary files /dev/null and b/test/image/regression-0.9.2-transform-opaque-6.swf.png differ
diff --git a/test/image/regression-0.9.2-transform-opaque-7.swf b/test/image/regression-0.9.2-transform-opaque-7.swf
new file mode 100644
index 0000000..e9ebff5
Binary files /dev/null and b/test/image/regression-0.9.2-transform-opaque-7.swf differ
diff --git a/test/image/regression-0.9.2-transform-opaque-7.swf.png b/test/image/regression-0.9.2-transform-opaque-7.swf.png
new file mode 100644
index 0000000..4f74134
Binary files /dev/null and b/test/image/regression-0.9.2-transform-opaque-7.swf.png differ
diff --git a/test/image/regression-0.9.2-transform-opaque-8.swf b/test/image/regression-0.9.2-transform-opaque-8.swf
new file mode 100644
index 0000000..1bc1139
Binary files /dev/null and b/test/image/regression-0.9.2-transform-opaque-8.swf differ
diff --git a/test/image/regression-0.9.2-transform-opaque-8.swf.png b/test/image/regression-0.9.2-transform-opaque-8.swf.png
new file mode 100644
index 0000000..5bb7699
Binary files /dev/null and b/test/image/regression-0.9.2-transform-opaque-8.swf.png differ
diff --git a/test/image/regression-0.9.2-transform-opaque.as b/test/image/regression-0.9.2-transform-opaque.as
new file mode 100644
index 0000000..dccf141
--- /dev/null
+++ b/test/image/regression-0.9.2-transform-opaque.as
@@ -0,0 +1,8 @@
+// makeswf -v 7 -s 200x150 -r 15 -o regression-0.9.2-transform-opaque.swf regression-0.9.2-transform-opaque.as
+
+createEmptyMovieClip ("x", 0);
+x.loadMovie ("bw.jpg");
+ct = new flash.geom.ColorTransform ();
+ct.alphaOffset = -128;
+t = new flash.geom.Transform (x);
+t.colorTransform = ct;
commit 380d85041a76a5c4224c7edbf9367eddef0ff56b
Author: Benjamin Otte <otte at gnome.org>
Date:   Thu Nov 20 12:00:24 2008 +0100

    fix regression with color transforms on opaque images (bug #18626)

diff --git a/swfdec/swfdec_renderer.c b/swfdec/swfdec_renderer.c
index 787e592..5913719 100644
--- a/swfdec/swfdec_renderer.c
+++ b/swfdec/swfdec_renderer.c
@@ -424,7 +424,8 @@ swfdec_renderer_transform (SwfdecRenderer *renderer, cairo_surface_t *surface,
 
   /* FIXME: This function should likely be a vfunc. 
    * Or better: it should compile to a shader */
-  if (cairo_surface_get_content (surface) & CAIRO_CONTENT_ALPHA) {
+  if (cairo_surface_get_content (surface) & CAIRO_CONTENT_ALPHA ||
+      trans->aa < 256 || trans->ab < 0) {
     target = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, rect->width, rect->height);
     mask = 0;
   } else {
commit 6579cea20fc9a5eac0c98464ec41fa8cb6488659
Merge: 2ea5b41... f13dd37...
Author: Benjamin Otte <otte at gnome.org>
Date:   Thu Nov 20 11:16:09 2008 +0100

    Merge branch '0.8'

commit f13dd37ca4cbf1bc5b80fa2fe215be1bf743d164
Author: Riccardo Magliocchetti <riccardo at datahost.it>
Date:   Mon Nov 10 19:20:52 2008 +0100

    zero memory when using it in PA

diff --git a/swfdec-gtk/swfdec_playback_pulse.c b/swfdec-gtk/swfdec_playback_pulse.c
index 5aa85f0..e884005 100644
--- a/swfdec-gtk/swfdec_playback_pulse.c
+++ b/swfdec-gtk/swfdec_playback_pulse.c
@@ -74,7 +74,7 @@ stream_write_callback (pa_stream *pa,
   /* Adjust to our rounded-down number */
   bytes = samples * SAMPLESIZE * CHANNELS;
 
-  frag = malloc (bytes);
+  frag = g_try_malloc0 (bytes);
   if (frag == NULL) {
     g_printerr ("Failed to allocate fragment of size %d\n", (int)bytes);
     return;
@@ -96,7 +96,7 @@ stream_write_callback (pa_stream *pa,
   /* Advance playback pointer */
   stream->offset += samples;
 
-  free(frag);
+  g_free (frag);
 }
 
 static void


More information about the Swfdec-commits mailing list