Package: gnash Version: 0.8.11~git20160608-1.3 Followup-For: Bug #853424 User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu bionic ubuntu-patch
Hello, Thanks for the hints in this bug regarding the API changes. I've prepared a patch which fixes the gnash build against current agg, and have uploaded it to Ubuntu. You may wish to consider applying it in Debian as well. -- Steve Langasek Give me a lever long enough and a Free OS Debian Developer to set it on, and I can move the world. Ubuntu Developer http://www.debian.org/ slanga...@ubuntu.com vor...@debian.org
diff -Nru gnash-0.8.11~git20160608/debian/patches/agg-2.4-r127-compatibility.patch gnash-0.8.11~git20160608/debian/patches/agg-2.4-r127-compatibility.patch --- gnash-0.8.11~git20160608/debian/patches/agg-2.4-r127-compatibility.patch 1969-12-31 16:00:00.000000000 -0800 +++ gnash-0.8.11~git20160608/debian/patches/agg-2.4-r127-compatibility.patch 2018-02-21 21:19:18.000000000 -0800 @@ -0,0 +1,149 @@ +Description: fix compatibility with agg 2.4r127 + call agg::rgba8().premultiply() instead of obsoleted rgba8_pre() + fix missing consts +Author: Steve Langasek <steve.langa...@ubuntu.com> +Bug-Debian: https://bugs.debian.org/853424 + +Index: gnash-0.8.11~git20160608/librender/agg/Renderer_agg_style.h +=================================================================== +--- gnash-0.8.11~git20160608.orig/librender/agg/Renderer_agg_style.h ++++ gnash-0.8.11~git20160608/librender/agg/Renderer_agg_style.h +@@ -614,8 +614,8 @@ + + // add the color to our self-made style handler (basically + // just a list) +- _sh.add_color(agg::rgba8_pre(color.m_r, color.m_g, color.m_b, +- color.m_a)); ++ _sh.add_color(agg::rgba8(color.m_r, color.m_g, color.m_b, ++ color.m_a).premultiply()); + } + + void operator()(const BitmapFill& f) const { +@@ -652,11 +652,11 @@ + + if (!bm) { + // See misc-swfmill.all/missing_bitmap.swf +- _sh.add_color(agg::rgba8_pre(255,0,0,255)); ++ _sh.add_color(agg::rgba8(255,0,0,255).premultiply()); + } + else if ( bm->disposed() ) { + // See misc-ming.all/BeginBitmapFill.swf +- _sh.add_color(agg::rgba8_pre(0,0,0,0)); ++ _sh.add_color(agg::rgba8(0,0,0,0).premultiply()); + } + else { + _sh.add_bitmap(dynamic_cast<const agg_bitmap_info*>(bm), +Index: gnash-0.8.11~git20160608/librender/agg/Renderer_agg.cpp +=================================================================== +--- gnash-0.8.11~git20160608.orig/librender/agg/Renderer_agg.cpp ++++ gnash-0.8.11~git20160608/librender/agg/Renderer_agg.cpp +@@ -418,8 +418,8 @@ + _ras.add_path(stroke); + + // Set the color and render the scanlines +- _renderer.color(agg::rgba8_pre(color.m_r, color.m_g, +- color.m_b, color.m_a)); ++ _renderer.color(agg::rgba8(color.m_r, color.m_g, ++ color.m_b, color.m_a).premultiply()); + + agg::render_scanlines(_ras, sl, _renderer); + +@@ -553,7 +553,7 @@ + + // cloning image accessor is used to avoid disturbing pixels at + // the edges for rotated video. +- typedef agg::image_accessor_clone<SourceFormat> Accessor; ++ typedef agg::image_accessor_clone<const SourceFormat> Accessor; + + /// Types used for different quality. + // +@@ -615,7 +615,7 @@ + } + else { + // Untested. +- typedef agg::scanline_u8_am<agg::alpha_mask_gray8> Scanline; ++ typedef agg::scanline_u8_am<const agg::alpha_mask_gray8> Scanline; + Scanline sl(masks.back().getMask()); + renderScanlines(path, rbase, sl, sg); + } +@@ -852,7 +852,7 @@ + // clear the stage using the background color + if ( ! _clipbounds.empty() ) + { +- const agg::rgba8& col = agg::rgba8_pre(bg.m_r, bg.m_g, bg.m_b, bg.m_a); ++ const agg::rgba8& col = agg::rgba8(bg.m_r, bg.m_g, bg.m_b, bg.m_a).premultiply(); + for (const auto& bounds : _clipbounds) + { + clear_framebuffer(bounds, col); +@@ -981,7 +981,7 @@ + } + else { + // Mask is active! +- typedef agg::scanline_u8_am<agg::alpha_mask_gray8> sl_type; ++ typedef agg::scanline_u8_am<const agg::alpha_mask_gray8> sl_type; + sl_type sl(_alphaMasks.back().getMask()); + lr.render(sl, stroke, color); + } +@@ -1425,7 +1425,7 @@ + + // Mask is active, use alpha mask scanline renderer + +- typedef agg::scanline_u8_am<agg::alpha_mask_gray8> scanline_type; ++ typedef agg::scanline_u8_am<const agg::alpha_mask_gray8> scanline_type; + + scanline_type sl(_alphaMasks.back().getMask()); + +@@ -1538,7 +1538,7 @@ + // Woohoo! We're drawing a nested mask! Use the previous mask while + // drawing the new one, the result will be the intersection. + +- typedef agg::scanline_u8_am<agg::alpha_mask_gray8> scanline_type; ++ typedef agg::scanline_u8_am<const agg::alpha_mask_gray8> scanline_type; + + scanline_type sl(_alphaMasks[mask_count - 2].getMask()); + +@@ -1632,7 +1632,7 @@ + + // Mask is active, use alpha mask scanline renderer + +- typedef agg::scanline_u8_am<agg::alpha_mask_gray8> scanline_type; ++ typedef agg::scanline_u8_am<const agg::alpha_mask_gray8> scanline_type; + + scanline_type sl(_alphaMasks.back().getMask()); + +@@ -1740,7 +1740,7 @@ + ras.add_path(stroke); + + rgba color = cx.transform(lstyle.get_color()); +- ren_sl.color(agg::rgba8_pre(color.m_r, color.m_g, color.m_b, color.m_a)); ++ ren_sl.color(agg::rgba8(color.m_r, color.m_g, color.m_b, color.m_a).premultiply()); + + agg::render_scanlines(ras, sl, ren_sl); + +@@ -1812,7 +1812,7 @@ + // fill polygon + if (fill.m_a>0) { + ras.add_path(path); +- ren_sl.color(agg::rgba8_pre(fill.m_r, fill.m_g, fill.m_b, fill.m_a)); ++ ren_sl.color(agg::rgba8(fill.m_r, fill.m_g, fill.m_b, fill.m_a).premultiply()); + + agg::render_scanlines(ras, sl, ren_sl); + } +@@ -1823,7 +1823,7 @@ + + stroke.width(1); + +- ren_sl.color(agg::rgba8_pre(outline.m_r, outline.m_g, outline.m_b, outline.m_a)); ++ ren_sl.color(agg::rgba8(outline.m_r, outline.m_g, outline.m_b, outline.m_a).premultiply()); + + ras.add_path(stroke); + +@@ -1841,7 +1841,7 @@ + + // apply mask + +- typedef agg::scanline_u8_am<agg::alpha_mask_gray8> sl_type; ++ typedef agg::scanline_u8_am<const agg::alpha_mask_gray8> sl_type; + + sl_type sl(_alphaMasks.back().getMask()); + diff -Nru gnash-0.8.11~git20160608/debian/patches/series gnash-0.8.11~git20160608/debian/patches/series --- gnash-0.8.11~git20160608/debian/patches/series 2016-12-20 12:44:00.000000000 -0800 +++ gnash-0.8.11~git20160608/debian/patches/series 2018-02-21 21:17:03.000000000 -0800 @@ -1,2 +1,3 @@ 00sensible fix-boost-1.60.patch +agg-2.4-r127-compatibility.patch