[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnash-commit] gnash ChangeLog backend/render_handler.h backen...
From: |
zou lunkai |
Subject: |
Re: [Gnash-commit] gnash ChangeLog backend/render_handler.h backen... |
Date: |
Thu, 29 May 2008 16:31:25 +0800 |
+ void draw_line_strip(const boost::int16_t* coords, int
vertex_count, const rgba& color
isn't int16 too small for coords in TWIPS? Not sure if it is TWIPS,
but all renderers might accept TWIPS in future. I guess int32 would be
appropriate here.
--zou
On 5/29/08, Bastiaan Jacques <address@hidden> wrote:
> CVSROOT: /sources/gnash
> Module name: gnash
> Changes by: Bastiaan Jacques <bjacques> 08/05/29 06:21:35
>
> Modified files:
> . : ChangeLog
> backend : render_handler.h render_handler_agg.cpp
> render_handler_cairo.cpp render_handler_ogl.cpp
>
> Log message:
> Replace the void pointer to draw_line_strip with the actual type.
>
> CVSWeb URLs:
> http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.6752&r2=1.6753
> http://cvs.savannah.gnu.org/viewcvs/gnash/backend/render_handler.h?cvsroot=gnash&r1=1.61&r2=1.62
> http://cvs.savannah.gnu.org/viewcvs/gnash/backend/render_handler_agg.cpp?cvsroot=gnash&r1=1.144&r2=1.145
> http://cvs.savannah.gnu.org/viewcvs/gnash/backend/render_handler_cairo.cpp?cvsroot=gnash&r1=1.44&r2=1.45
> http://cvs.savannah.gnu.org/viewcvs/gnash/backend/render_handler_ogl.cpp?cvsroot=gnash&r1=1.112&r2=1.113
>
> Patches:
> Index: ChangeLog
> ===================================================================
> RCS file: /sources/gnash/gnash/ChangeLog,v
> retrieving revision 1.6752
> retrieving revision 1.6753
> diff -u -b -r1.6752 -r1.6753
> --- ChangeLog 29 May 2008 05:20:48 -0000 1.6752
> +++ ChangeLog 29 May 2008 06:21:31 -0000 1.6753
> @@ -1,5 +1,10 @@
> 2008-05-29 Bastiaan Jacques <address@hidden>
>
> + * backend/render_handler{.h,_agg.cpp,_ogl.cpp,_cairo.cpp}: Replace the
> + void pointer to draw_line_strip with the actual type.
> +
> +2008-05-29 Bastiaan Jacques <address@hidden>
> +
> * backend/render_handler.h: Add anti-alias types for future
> use. Document draw_line_strip.
> * backend/render_handler_cairo.cpp: Implement draw_line_strip.
>
> Index: backend/render_handler.h
> ===================================================================
> RCS file: /sources/gnash/gnash/backend/render_handler.h,v
> retrieving revision 1.61
> retrieving revision 1.62
> diff -u -b -r1.61 -r1.62
> --- backend/render_handler.h 29 May 2008 05:20:50 -0000 1.61
> +++ backend/render_handler.h 29 May 2008 06:21:34 -0000 1.62
> @@ -350,7 +350,7 @@
> /// @color the color to be used to draw the line strip.
> ///
> /// @mat the matrix to be used to transform the vertices.
> - virtual void draw_line_strip(const void* coords, int vertex_count,
> + virtual void draw_line_strip(const boost::int16_t* coords, int
> vertex_count,
> const rgba& color, const matrix& mat) = 0;
>
> /// Draw a simple, solid filled polygon with a thin (~1 pixel) outline.
>
> Index: backend/render_handler_agg.cpp
> ===================================================================
> RCS file: /sources/gnash/gnash/backend/render_handler_agg.cpp,v
> retrieving revision 1.144
> retrieving revision 1.145
> diff -u -b -r1.144 -r1.145
> --- backend/render_handler_agg.cpp 7 May 2008 14:38:14 -0000 1.144
> +++ backend/render_handler_agg.cpp 29 May 2008 06:21:34 -0000 1.145
> @@ -719,7 +719,7 @@
>
>
>
> - void draw_line_strip(const void* coords, int vertex_count, const rgba&
> color,
> + void draw_line_strip(const boost::int16_t* coords, int vertex_count,
> const rgba& color,
> const matrix& line_mat)
> // Draw the line strip formed by the sequence of points.
> {
> @@ -749,7 +749,7 @@
> stroke.line_join(agg::round_join);
> path.remove_all(); // Not obligatory in this case
>
> - const boost::int16_t *vertex = static_cast<const
> boost::int16_t*>(coords);
> + const boost::int16_t *vertex = coords;
>
> mat.transform(&pnt, point(vertex[0], vertex[1]));
> path.move_to(pnt.x, pnt.y);
>
> Index: backend/render_handler_cairo.cpp
> ===================================================================
> RCS file: /sources/gnash/gnash/backend/render_handler_cairo.cpp,v
> retrieving revision 1.44
> retrieving revision 1.45
> diff -u -b -r1.44 -r1.45
> --- backend/render_handler_cairo.cpp 29 May 2008 05:20:50 -0000 1.44
> +++ backend/render_handler_cairo.cpp 29 May 2008 06:21:34 -0000 1.45
> @@ -405,11 +405,9 @@
> cairo_restore(_cr);
> }
>
> - virtual void draw_line_strip(const void* coords, int vertex_count,
> + virtual void draw_line_strip(const boost::int16_t coords[], int
> vertex_count,
> const rgba& color, const matrix& mat)
> - // In this day and age, do we still need void* pointers?
> {
> - const boost::int16_t* vertices = static_cast<const
> boost::int16_t*>(coords);
> CairoScopeMatrix mat_transformer(_cr, mat);
>
> if (vertex_count < 2) {
> @@ -417,15 +415,15 @@
> }
>
> double x, y;
> - x = vertices[0];
> - y = vertices[1];
> + x = coords[0];
> + y = coords[1];
> snap_to_half_pixel(_cr, x, y);
>
> cairo_move_to(_cr, x, y);
>
> for (int i = 2; i < vertex_count * 2; i += 2) {
> - x = vertices[i];
> - y = vertices[i+1];
> + x = coords[i];
> + y = coords[i+1];
> snap_to_half_pixel(_cr, x, y);
> cairo_line_to(_cr, x, y);
> }
>
> Index: backend/render_handler_ogl.cpp
> ===================================================================
> RCS file: /sources/gnash/gnash/backend/render_handler_ogl.cpp,v
> retrieving revision 1.112
> retrieving revision 1.113
> diff -u -b -r1.112 -r1.113
> --- backend/render_handler_ogl.cpp 22 May 2008 06:59:29 -0000 1.112
> +++ backend/render_handler_ogl.cpp 29 May 2008 06:21:34 -0000 1.113
> @@ -868,7 +868,7 @@
> //
> /// Can be used to draw empty boxes and cursors.
> virtual void
> - draw_line_strip(const void* coords, int vertex_count, const rgba& color,
> + draw_line_strip(const boost::int16_t* coords, int vertex_count, const
> rgba& color,
> const matrix& mat)
> {
> glPushMatrix();
>
>
> _______________________________________________
> Gnash-commit mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/gnash-commit
>