CVSROOT: /cvsroot/gnash Module name: gnash Changes by: Udo Giacomozzi <udog> 07/02/13 13:56:35
Modified files: . : ChangeLog backend : render_handler_agg.cpp Log message: Correctly handling NULL clipping rectangle CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2341&r2=1.2342 http://cvs.savannah.gnu.org/viewcvs/gnash/backend/render_handler_agg.cpp?cvsroot=gnash&r1=1.56&r2=1.57 Patches: Index: ChangeLog =================================================================== RCS file: /cvsroot/gnash/gnash/ChangeLog,v retrieving revision 1.2341 retrieving revision 1.2342 diff -u -b -r1.2341 -r1.2342 --- ChangeLog 13 Feb 2007 13:35:33 -0000 1.2341 +++ ChangeLog 13 Feb 2007 13:56:35 -0000 1.2342 @@ -29,6 +29,8 @@ configurable * gui/fb.cpp, gui/fbsup.h: Initial support for mouse * server/character.h: Avoid redrawing when matrix did not change + * backend/render_handler_agg.cpp: Correctly handling NULL clipping + rectangle 2007-02-13 Rob Savoye <[EMAIL PROTECTED]> Index: backend/render_handler_agg.cpp =================================================================== RCS file: /cvsroot/gnash/gnash/backend/render_handler_agg.cpp,v retrieving revision 1.56 retrieving revision 1.57 diff -u -b -r1.56 -r1.57 --- backend/render_handler_agg.cpp 10 Feb 2007 17:22:47 -0000 1.56 +++ backend/render_handler_agg.cpp 13 Feb 2007 13:56:35 -0000 1.57 @@ -16,7 +16,7 @@ -/* $Id: render_handler_agg.cpp,v 1.56 2007/02/10 17:22:47 udog Exp $ */ +/* $Id: render_handler_agg.cpp,v 1.57 2007/02/13 13:56:35 udog Exp $ */ // Original version by Udo Giacomozzi and Hannes Mayr, // INDUNET GmbH (www.indunet.it) @@ -258,6 +258,7 @@ void clear(geometry::Range2d<int> region) { if (region.isNull()) return; + assert ( region.isFinite() ); const agg::gray8 black(0); @@ -551,6 +552,7 @@ assert(m_pixf != NULL); // clear the stage using the background color + if ( ! _clipbounds.isNull() ) clear_framebuffer(_clipbounds, agg::rgba8(background_color.m_r, background_color.m_g, background_color.m_b, background_color.m_a)); @@ -653,6 +655,8 @@ { assert(m_pixf != NULL); + if ( _clipbounds.isNull() ) return; + point pnt; renderer_base rbase(*m_pixf); @@ -717,6 +721,7 @@ agg_alpha_mask* new_mask = new agg_alpha_mask(xres, yres); + if ( ! _clipbounds.isNull() ) new_mask->clear(_clipbounds); m_alpha_mask.push_back(new_mask); @@ -928,6 +933,8 @@ assert(!m_drawing_mask); + if ( _clipbounds.isNull() ) return; + // Gnash stuff int pno, eno, fno; int pcount, ecount, fcount; @@ -941,9 +948,6 @@ agg::span_allocator<agg::rgba8> alloc; // span allocator (?) agg_style_handler sh; // holds fill style definitions - // TODO: what do do if _clipbox.isNull() or _clipbox.isWorld() ? - // currently an assertion will fail when get{Min,Max}{X,Y} - // are called below rasc.clip_box( (double)_clipbounds.getMinX(), @@ -1241,6 +1245,8 @@ if (m_drawing_mask) // Flash ignores lines in mask /definitions/ return; + if ( _clipbounds.isNull() ) return; + // TODO: While walking the paths for filling them, remember when a path // has a line style associated, so that we avoid walking the paths again // when there really are no outlines to draw... @@ -1344,6 +1350,8 @@ if (corner_count<1) return; + if ( _clipbounds.isNull() ) return; + // TODO: Use aliased scanline renderer instead of anti-aliased one since // it is undesired anyway. renderer_base rbase(*m_pixf); @@ -1444,6 +1452,7 @@ Range2d<int> visiblerect(0, 0, xres, yres); _clipbounds = Intersection(pixbounds, visiblerect); + } virtual bool bounds_in_clipping_area(const rect& bounds) { _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit