[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog backend/render_handler_agg.cpp
From: |
Udo Giacomozzi |
Subject: |
[Gnash-commit] gnash ChangeLog backend/render_handler_agg.cpp |
Date: |
Wed, 07 Mar 2007 10:59:42 +0000 |
CVSROOT: /cvsroot/gnash
Module name: gnash
Changes by: Udo Giacomozzi <udog> 07/03/07 10:59:42
Modified files:
. : ChangeLog
backend : render_handler_agg.cpp
Log message:
fixed segfault #19223; set correct visiblerect; fixed Range2d.width()
usage; fixed getMaxY() usage
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2562&r2=1.2563
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/render_handler_agg.cpp?cvsroot=gnash&r1=1.66&r2=1.67
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/gnash/gnash/ChangeLog,v
retrieving revision 1.2562
retrieving revision 1.2563
diff -u -b -r1.2562 -r1.2563
--- ChangeLog 6 Mar 2007 20:45:55 -0000 1.2562
+++ ChangeLog 7 Mar 2007 10:59:42 -0000 1.2563
@@ -1,3 +1,8 @@
+2007-03-07 Udo Giacomozzi <address@hidden>
+
+ * backend/render_handler_agg.cpp: fixed segfault #19223; set correct
+ visiblerect; fixed Range2d.width() usage; fixed getMaxY() usage
+
2007-03-06 Sandro Santilli <address@hidden>
* testsuite/swfdec/: README, swfdec_gnash_tester:
Index: backend/render_handler_agg.cpp
===================================================================
RCS file: /cvsroot/gnash/gnash/backend/render_handler_agg.cpp,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -b -r1.66 -r1.67
--- backend/render_handler_agg.cpp 6 Mar 2007 20:45:55 -0000 1.66
+++ backend/render_handler_agg.cpp 7 Mar 2007 10:59:42 -0000 1.67
@@ -16,7 +16,7 @@
-/* $Id: render_handler_agg.cpp,v 1.66 2007/03/06 20:45:55 bjacques Exp $ */
+/* $Id: render_handler_agg.cpp,v 1.67 2007/03/07 10:59:42 udog Exp $ */
// Original version by Udo Giacomozzi and Hannes Mayr,
// INDUNET GmbH (www.indunet.it)
@@ -269,14 +269,15 @@
const agg::gray8 black(0);
- // TODO: what to do in this case ?
+ // region can't be world as it should be intersected with
+ // the visible rect
assert (! region.isWorld() );
unsigned int left=region.getMinX();
- unsigned int width=region.width();
+ unsigned int width=region.width()+1;
// to be exact, it's one off the max. (?)
const unsigned int max_y = region.getMaxY();
- for (unsigned int y=region.getMinY(); y<max_y; y++)
+ for (unsigned int y=region.getMinY(); y<=max_y; y++)
{
m_pixf.copy_hline(left, y, width, black);
}
@@ -583,25 +584,22 @@
agg::rgba8 color)
{
assert(region.isFinite());
- if (region.width() < 1)
- {
- log_warning("clear_framebuffer() called with width=%d",
- region.width());
- return;
- }
- if (region.height() < 1)
- {
- log_warning("clear_framebuffer() called with height=%d",
- region.height());
- return;
- }
+ // add 1 to width since we have still to draw a pixel
when
+ // getMinX==getMaxX
+ unsigned int width=region.width()+1;
+
+ // <Udo> Note: We don't need to check for width/height
anymore because
+ // Range2d will take care that getMinX <= getMaxX and
it's okay when
+ // region.width()==0 because in that case
getMinX==getMaxX and we have
+ // still a pixel to draw.
+
unsigned int left=region.getMinX();
for (unsigned int y=region.getMinY(), maxy=region.getMaxY();
y<=maxy; ++y)
{
- m_pixf->copy_hline(left, y, region.width(), color);
+ m_pixf->copy_hline(left, y, width, color);
}
}
@@ -1768,7 +1766,7 @@
// TODO: cache 'visiblerect' and maintain in sync with
// xres/yres.
- Range2d<int> visiblerect(0, 0, xres, yres);
+ Range2d<int> visiblerect(0, 0, xres-1, yres-1);
for (int rno=0; rno<ranges.size(); rno++) {