[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog backend/render_handler_agg.cpp ... [relea
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog backend/render_handler_agg.cpp ... [release_0_8_2_rc1] |
Date: |
Tue, 04 Mar 2008 11:04:00 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Branch: release_0_8_2_rc1
Changes by: Sandro Santilli <strk> 08/03/04 11:04:00
Modified files:
. : ChangeLog
backend : render_handler_agg.cpp render_handler_ogl.cpp
server : sprite_instance.cpp
testsuite/misc-ming.all: DrawingApiTest.as
Log message:
* server/sprite_instance.cpp: check arguments of drawing api
functions for being finite.
* testsuite/misc-ming.all/DrawingApiTest.as: test passing
non-finite parameters to the drawing api.
* backend/: render_handler_agg.cpp, render_handler_ogl.cpp:
Revert Bastiaan patch casting to int, the problem is in
the drawing api.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&only_with_tag=release_0_8_2_rc1&r1=1.5711.2.46&r2=1.5711.2.47
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/render_handler_agg.cpp?cvsroot=gnash&only_with_tag=release_0_8_2_rc1&r1=1.127.2.1&r2=1.127.2.2
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/render_handler_ogl.cpp?cvsroot=gnash&only_with_tag=release_0_8_2_rc1&r1=1.106.2.1&r2=1.106.2.2
http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.cpp?cvsroot=gnash&only_with_tag=release_0_8_2_rc1&r1=1.480.2.1&r2=1.480.2.2
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/DrawingApiTest.as?cvsroot=gnash&only_with_tag=release_0_8_2_rc1&r1=1.32&r2=1.32.2.1
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5711.2.46
retrieving revision 1.5711.2.47
diff -u -b -r1.5711.2.46 -r1.5711.2.47
--- ChangeLog 4 Mar 2008 08:56:08 -0000 1.5711.2.46
+++ ChangeLog 4 Mar 2008 11:03:57 -0000 1.5711.2.47
@@ -1,5 +1,15 @@
2008-03-04 Sandro Santilli <address@hidden>
+ * server/sprite_instance.cpp: check arguments of drawing api
+ functions for being finite.
+ * testsuite/misc-ming.all/DrawingApiTest.as: test passing
+ non-finite parameters to the drawing api.
+ * backend/: render_handler_agg.cpp, render_handler_ogl.cpp:
+ Revert Bastiaan patch casting to int, the problem is in
+ the drawing api.
+
+2008-03-04 Sandro Santilli <address@hidden>
+
* doc/C/bugreport.xml, doc/C/doc_authors.xml, doc/C/gnashref.xml,
doc/C/gnashuser.xml, doc/C/introduction.xml, doc/C/security.xml,
doc/C/usermanual/gnashrc.xml: Add missing files. distcheck
Index: backend/render_handler_agg.cpp
===================================================================
RCS file: /sources/gnash/gnash/backend/render_handler_agg.cpp,v
retrieving revision 1.127.2.1
retrieving revision 1.127.2.2
diff -u -b -r1.127.2.1 -r1.127.2.2
--- backend/render_handler_agg.cpp 4 Mar 2008 00:25:04 -0000
1.127.2.1
+++ backend/render_handler_agg.cpp 4 Mar 2008 11:03:59 -0000
1.127.2.2
@@ -17,7 +17,7 @@
-/* $Id: render_handler_agg.cpp,v 1.127.2.1 2008/03/04 00:25:04 bjacques Exp $
*/
+/* $Id: render_handler_agg.cpp,v 1.127.2.2 2008/03/04 11:03:59 strk Exp $ */
// Original version by Udo Giacomozzi and Hannes Mayr,
// INDUNET GmbH (www.indunet.it)
@@ -1066,7 +1066,7 @@
for (pno=0; pno<pcount; pno++) {
path &the_path = paths_out[pno];
- point oldpnt((int)the_path.ap.x, (int)the_path.ap.y);
+ point oldpnt(the_path.ap.x, the_path.ap.y);
point newpnt;
mat.transform(&newpnt, oldpnt);
the_path.ap.x = newpnt.x;
@@ -1077,14 +1077,14 @@
edge &the_edge = the_path.m_edges[eno];
- oldpnt.x = (int)the_edge.ap.x;
- oldpnt.y = (int)the_edge.ap.y;
+ oldpnt.x = the_edge.ap.x;
+ oldpnt.y = the_edge.ap.y;
mat.transform(&newpnt, oldpnt);
the_edge.ap.x = newpnt.x;
the_edge.ap.y = newpnt.y;
- oldpnt.x = (int)the_edge.cp.x;
- oldpnt.y = (int)the_edge.cp.y;
+ oldpnt.x = the_edge.cp.x;
+ oldpnt.y = the_edge.cp.y;
mat.transform(&newpnt, oldpnt);
the_edge.cp.x = newpnt.x;
the_edge.cp.y = newpnt.y;
Index: backend/render_handler_ogl.cpp
===================================================================
RCS file: /sources/gnash/gnash/backend/render_handler_ogl.cpp,v
retrieving revision 1.106.2.1
retrieving revision 1.106.2.2
diff -u -b -r1.106.2.1 -r1.106.2.2
--- backend/render_handler_ogl.cpp 4 Mar 2008 00:25:04 -0000
1.106.2.1
+++ backend/render_handler_ogl.cpp 4 Mar 2008 11:03:59 -0000
1.106.2.2
@@ -264,12 +264,12 @@
it != end; ++it) {
const edge& the_edge = *it;
- point target((int)the_edge.ap.x, (int)the_edge.ap.y);
+ point target(the_edge.ap.x, the_edge.ap.y);
if (the_edge.is_straight()) {
shape_points.push_back(oglVertex(target));
} else {
- point control((int)the_edge.cp.x, (int)the_edge.cp.y);
+ point control(the_edge.cp.x, the_edge.cp.y);
trace_curve(anchor, control, target, shape_points);
}
Index: server/sprite_instance.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v
retrieving revision 1.480.2.1
retrieving revision 1.480.2.2
diff -u -b -r1.480.2.1 -r1.480.2.2
--- server/sprite_instance.cpp 28 Feb 2008 11:18:15 -0000 1.480.2.1
+++ server/sprite_instance.cpp 4 Mar 2008 11:03:59 -0000 1.480.2.2
@@ -1249,6 +1249,28 @@
float x = PIXELS_TO_TWIPS(fn.arg(0).to_number());
float y = PIXELS_TO_TWIPS(fn.arg(1).to_number());
+ if ( ! isfinite(x) )
+ {
+ IF_VERBOSE_ASCODING_ERRORS(
+ std::stringstream ss; fn.dump_args(ss);
+ log_aserror("%s.lineTo(%s) : non-finite first argument (%s), "
+ "converted to zero", sprite->getTarget().c_str(),
+ ss.str().c_str(), fn.arg(0).to_debug_string().c_str());
+ );
+ x = 0;
+ }
+
+ if ( ! isfinite(y) )
+ {
+ IF_VERBOSE_ASCODING_ERRORS(
+ std::stringstream ss; fn.dump_args(ss);
+ log_aserror("%s.lineTo(%s) : non-finite second argument (%s), "
+ "converted to zero", sprite->getTarget().c_str(),
+ ss.str().c_str(), fn.arg(1).to_debug_string().c_str());
+ );
+ y = 0;
+ }
+
#ifdef DEBUG_DRAWING_API
log_debug("%s.lineTo(%g,%g);", sprite->getTarget().c_str(), x, y);
#endif
@@ -1273,6 +1295,28 @@
float x = PIXELS_TO_TWIPS(fn.arg(0).to_number());
float y = PIXELS_TO_TWIPS(fn.arg(1).to_number());
+ if ( ! isfinite(x) )
+ {
+ IF_VERBOSE_ASCODING_ERRORS(
+ std::stringstream ss; fn.dump_args(ss);
+ log_aserror("%s.moveTo(%s) : non-finite first argument (%s), "
+ "converted to zero", sprite->getTarget().c_str(),
+ ss.str().c_str(), fn.arg(0).to_debug_string().c_str());
+ );
+ x = 0;
+ }
+
+ if ( ! isfinite(y) )
+ {
+ IF_VERBOSE_ASCODING_ERRORS(
+ std::stringstream ss; fn.dump_args(ss);
+ log_aserror("%s.moveTo(%s) : non-finite second argument (%s), "
+ "converted to zero", sprite->getTarget().c_str(),
+ ss.str().c_str(), fn.arg(1).to_debug_string().c_str());
+ );
+ y = 0;
+ }
+
#ifdef DEBUG_DRAWING_API
log_debug("%s.moveTo(%g,%g);", sprite->getTarget().c_str(), x, y);
#endif
@@ -1346,6 +1390,50 @@
float ax = PIXELS_TO_TWIPS(fn.arg(2).to_number());
float ay = PIXELS_TO_TWIPS(fn.arg(3).to_number());
+ if ( ! isfinite(cx) )
+ {
+ IF_VERBOSE_ASCODING_ERRORS(
+ std::stringstream ss; fn.dump_args(ss);
+ log_aserror("%s.curveTo(%s) : non-finite first argument (%s), "
+ "converted to zero", sprite->getTarget().c_str(),
+ ss.str().c_str(), fn.arg(0).to_debug_string().c_str());
+ );
+ cx = 0;
+ }
+
+ if ( ! isfinite(cy) )
+ {
+ IF_VERBOSE_ASCODING_ERRORS(
+ std::stringstream ss; fn.dump_args(ss);
+ log_aserror("%s.curveTo(%s) : non-finite second argument (%s), "
+ "converted to zero", sprite->getTarget().c_str(),
+ ss.str().c_str(), fn.arg(1).to_debug_string().c_str());
+ );
+ cy = 0;
+ }
+
+ if ( ! isfinite(ax) )
+ {
+ IF_VERBOSE_ASCODING_ERRORS(
+ std::stringstream ss; fn.dump_args(ss);
+ log_aserror("%s.curveTo(%s) : non-finite third argument (%s), "
+ "converted to zero", sprite->getTarget().c_str(),
+ ss.str().c_str(), fn.arg(0).to_debug_string().c_str());
+ );
+ ax = 0;
+ }
+
+ if ( ! isfinite(ay) )
+ {
+ IF_VERBOSE_ASCODING_ERRORS(
+ std::stringstream ss; fn.dump_args(ss);
+ log_aserror("%s.curveTo(%s) : non-finite fourth argument (%s), "
+ "converted to zero", sprite->getTarget().c_str(),
+ ss.str().c_str(), fn.arg(1).to_debug_string().c_str());
+ );
+ ay = 0;
+ }
+
#ifdef DEBUG_DRAWING_API
log_debug("%s.curveTo(%g,%g,%g,%g);", sprite->getTarget().c_str(), cx, cy,
ax, ay);
#endif
Index: testsuite/misc-ming.all/DrawingApiTest.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/DrawingApiTest.as,v
retrieving revision 1.32
retrieving revision 1.32.2.1
diff -u -b -r1.32 -r1.32.2.1
--- testsuite/misc-ming.all/DrawingApiTest.as 8 Jan 2008 21:53:43 -0000
1.32
+++ testsuite/misc-ming.all/DrawingApiTest.as 4 Mar 2008 11:04:00 -0000
1.32.2.1
@@ -17,7 +17,7 @@
// 'h' toggles _visible
//
-rcsid="$Id: DrawingApiTest.as,v 1.32 2008/01/08 21:53:43 strk Exp $";
+rcsid="$Id: DrawingApiTest.as,v 1.32.2.1 2008/03/04 11:04:00 strk Exp $";
#include "../actionscript.all/check.as"
@@ -228,6 +228,29 @@
check( zshape.hitTest((223+25), (145+20), true) ); // 3
check( zshape.hitTest(273, 165, true) ); // 4
+ createEmptyMovieClip("x", 20);
+ with (x)
+ {
+ lineStyle(6, 0xFF8800);
+ beginFill(0x888800, 100);
+ moveTo(100, 100);
+ lineTo("string", NaN); // equivalent to 0, 0
+ curveTo(100, "string", Object, 100); // equivalent to 100, 0,
0, 100
+ moteTo(undefined, 0); // equivalent to 0, 0
+ lineTo(100, null);
+ endFill();
+ }
+ x._x = 100;
+ x._y = 150;
+ x._xscale = 30;
+ x._yscale = 30;
+#if 0 // TODO: check these
+ check( x.hitTest(223, 145, true) );
+ check( x.hitTest((223+10), (145+0), true) );
+ check( x.hitTest((223+20), (145+5), true) );
+ check( x.hitTest((223+25), (145+20), true) );
+ check( x.hitTest(273, 165, true) );
+#endif
}
// Make the MovieClip "active" (grabbing mouse events)