gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog backend/Makefile.am backend/ren...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog backend/Makefile.am backend/ren...
Date: Tue, 26 Sep 2006 15:08:06 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  06/09/26 15:08:06

Modified files:
        .              : ChangeLog 
        backend        : Makefile.am render_handler_cairo.cpp 
                         render_handler_ogl.cpp 
        server         : Makefile.am gnash.h render.h 
        server/parser  : Makefile.am 
Added files:
        backend        : render_handler.h 

Log message:
        moved render_handler class definition in it's own file under backend/

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.928&r2=1.929
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/Makefile.am?cvsroot=gnash&r1=1.33&r2=1.34
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/render_handler_cairo.cpp?cvsroot=gnash&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/render_handler_ogl.cpp?cvsroot=gnash&r1=1.27&r2=1.28
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/render_handler.h?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/Makefile.am?cvsroot=gnash&r1=1.67&r2=1.68
http://cvs.savannah.gnu.org/viewcvs/gnash/server/gnash.h?cvsroot=gnash&r1=1.49&r2=1.50
http://cvs.savannah.gnu.org/viewcvs/gnash/server/render.h?cvsroot=gnash&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/Makefile.am?cvsroot=gnash&r1=1.5&r2=1.6

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.928
retrieving revision 1.929
diff -u -b -r1.928 -r1.929
--- ChangeLog   26 Sep 2006 14:17:32 -0000      1.928
+++ ChangeLog   26 Sep 2006 15:08:06 -0000      1.929
@@ -1,5 +1,11 @@
 2006-09-26 Sandro Santilli  <address@hidden>
 
+       * backend/Makefile.am, backend/render_handler.h,
+         backend/render_handler_cairo.cpp, backend/render_handler_ogl.cpp,
+         server/Makefile.am, server/gnash.h, server/render.h,
+         server/parser/Makefile.am:
+         moved render_handler class definition in it's own file
+         under backend/
        * server/asobj/MovieClip.cpp: removed useless includes.
        * backend/Makefile.am, backend/render_handler.h:
          moved render_handler class definitino in it's own header.

Index: backend/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/backend/Makefile.am,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -b -r1.33 -r1.34
--- backend/Makefile.am 26 Sep 2006 13:49:29 -0000      1.33
+++ backend/Makefile.am 26 Sep 2006 15:08:06 -0000      1.34
@@ -75,6 +75,9 @@
        $(OGG_CFLAGS)           \
        $(GSTREAMER_CFLAGS)
 
+noinst_HEADERS = \
+       render_handler.h
+
 # bin_PROGRAMS = gnash
 
 #noinst_LTLIBRARIES = libgbackend.la

Index: backend/render_handler_cairo.cpp
===================================================================
RCS file: /sources/gnash/gnash/backend/render_handler_cairo.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- backend/render_handler_cairo.cpp    26 Sep 2006 09:29:01 -0000      1.8
+++ backend/render_handler_cairo.cpp    26 Sep 2006 15:08:06 -0000      1.9
@@ -8,7 +8,8 @@
 
 #include <cairo/cairo.h>
 #include <cairo/cairo-xlib.h>
-#include "gnash.h"
+//#include "gnash.h"
+#include "render_handler.h"
 #include "types.h"
 #include "image.h"
 #include "utility.h"
@@ -536,8 +537,8 @@
        // Intended for textured glyph rendering.
        {
 //         GNASH_REPORT_FUNCTION;
-           assert(bi);
-           bitmap_info_cairo* bi = dynamic_cast<bitmap_info_cairo*>(binfo);
+            gnash::bitmap_info* nonconst_binfo = 
const_cast<gnash::bitmap_info*>(binfo);
+           bitmap_info_cairo* bi = 
dynamic_cast<bitmap_info_cairo*>(nonconst_binfo);
            assert(bi);
 
            apply_color(color);

Index: backend/render_handler_ogl.cpp
===================================================================
RCS file: /sources/gnash/gnash/backend/render_handler_ogl.cpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -b -r1.27 -r1.28
--- backend/render_handler_ogl.cpp      19 Sep 2006 14:36:16 -0000      1.27
+++ backend/render_handler_ogl.cpp      26 Sep 2006 15:08:06 -0000      1.28
@@ -6,7 +6,8 @@
 // A render_handler that uses SDL & OpenGL
 
 
-#include "gnash.h"
+//#include "gnash.h"
+#include "render_handler.h"
 #include "types.h"
 #include "image.h"
 #include "utility.h"

Index: server/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/server/Makefile.am,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -b -r1.67 -r1.68
--- server/Makefile.am  26 Sep 2006 08:15:51 -0000      1.67
+++ server/Makefile.am  26 Sep 2006 15:08:06 -0000      1.68
@@ -48,6 +48,7 @@
 
 # Only enable if we're configured with --enable-mp3
 INCLUDES = \
+       -I$(top_srcdir)/backend \
        -I$(top_srcdir)/server/swf \
        -I$(top_srcdir)/server/asobj \
        -I$(top_srcdir)/server/parser \

Index: server/gnash.h
===================================================================
RCS file: /sources/gnash/gnash/server/gnash.h,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -b -r1.49 -r1.50
--- server/gnash.h      23 Sep 2006 16:20:59 -0000      1.49
+++ server/gnash.h      26 Sep 2006 15:08:06 -0000      1.50
@@ -674,112 +674,6 @@
                }
 };
        
-/// You must define a subclass of render_handler, and pass an
-/// instance to set_render_handler().
-class DSOEXPORT render_handler
-{
-public:
-       virtual ~render_handler() {}
-
-       // Your handler should return these with a ref-count of 0.  (@@ is that 
the right policy?)
-
-       /// \brief
-       ///  Create a bitmap_info so that it contains an alpha texture
-       /// with the given data (1 byte per texel).
-       //
-       /// Munges *data (in order to make mipmaps)!!
-       ///
-       virtual bitmap_info*    create_bitmap_info_alpha(int w, int h, unsigned 
char* data) = 0;
-
-       /// \brief
-       /// Given an image, returns a pointer to a bitmap_info class
-       /// that can later be passed to fill_styleX_bitmap(), to set a
-       /// bitmap fill style.
-       virtual bitmap_info*    create_bitmap_info_rgb(image::rgb* im) = 0;
-
-       /// \brief
-       /// Given an image, returns a pointer to a bitmap_info class
-       /// that can later be passed to fill_style_bitmap(), to set a
-       /// bitmap fill style.
-       //
-       /// This version takes an image with an alpha channel.
-       ///
-       virtual bitmap_info*    create_bitmap_info_rgba(image::rgba* im) = 0;
-
-       /// Delete the given bitmap info class.
-       virtual void    delete_bitmap_info(bitmap_info* bi) = 0;
-               
-       /// Bracket the displaying of a frame from a movie.
-       //
-       /// Fill the background color, and set up default
-       /// transforms, etc.
-       ///
-       virtual void    begin_display(
-               rgba background_color,
-               int viewport_x0, int viewport_y0,
-               int viewport_width, int viewport_height,
-               float x0, float x1, float y0, float y1) = 0;
-
-       virtual void    end_display() = 0;
-               
-       /// Geometric transforms for mesh and line_strip rendering.
-       virtual void    set_matrix(const matrix& m) = 0;
-
-       /// Color transforms for mesh and line_strip rendering.
-       virtual void    set_cxform(const cxform& cx) = 0;
-               
-       /// Draw triangles using the current fill-style 0.
-       //
-       /// Clears the style list after rendering.
-       ///
-       /// coords is a list of (x,y) coordinate pairs, in
-       /// triangle-strip order.  The type of the array should
-       /// be int16_t[vertex_count*2]
-       ///
-       virtual void    draw_mesh_strip(const void* coords, int vertex_count) = 
0;
-               
-       /// Draw a line-strip using the current line style.
-       //
-       /// Clear the style list after rendering.
-       ///
-       /// Coords is a list of (x,y) coordinate pairs, in
-       /// sequence.  Each coord is a 16-bit signed integer.
-       ///
-       virtual void    draw_line_strip(const void* coords, int vertex_count) = 
0;
-               
-       /// Set line and fill styles for mesh & line_strip rendering.
-       enum bitmap_wrap_mode
-       {
-               WRAP_REPEAT,
-               WRAP_CLAMP
-       };
-       virtual void    fill_style_disable(int fill_side) = 0;
-       virtual void    fill_style_color(int fill_side, rgba color) = 0;
-       virtual void    fill_style_bitmap(int fill_side, const bitmap_info* bi, 
const matrix& m, bitmap_wrap_mode wm) = 0;
-               
-       virtual void    line_style_disable() = 0;
-       virtual void    line_style_color(rgba color) = 0;
-       virtual void    line_style_width(float width) = 0;
-               
-       /// Special function to draw a rectangular bitmap.
-       //
-       /// Intended for textured glyph rendering.  Ignores
-       /// current transforms.
-       ///
-       virtual void    draw_bitmap(
-               const matrix&           m,
-               const bitmap_info*      bi,
-               const rect&             coords,
-               const rect&             uv_coords,
-               rgba                    color) = 0;
-               
-       virtual void    set_antialiased(bool enable) = 0;
-               
-       virtual void begin_submit_mask() = 0;
-       virtual void end_submit_mask() = 0;
-       virtual void disable_mask() = 0;
-};
-       
 /// Keyboard handling
 namespace key {
 enum code

Index: server/render.h
===================================================================
RCS file: /sources/gnash/gnash/server/render.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- server/render.h     14 Sep 2006 03:00:23 -0000      1.6
+++ server/render.h     26 Sep 2006 15:08:06 -0000      1.7
@@ -13,6 +13,7 @@
 #include "types.h"
 #include "gnash.h"
 #include "image.h"
+#include "render_handler.h"
 
 
 namespace gnash {

Index: server/parser/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/server/parser/Makefile.am,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- server/parser/Makefile.am   25 Sep 2006 15:17:42 -0000      1.5
+++ server/parser/Makefile.am   26 Sep 2006 15:08:06 -0000      1.6
@@ -43,7 +43,12 @@
 noinst_LTLIBRARIES = libgnashparser.la 
 
 # Only enable if we're configured with --enable-mp3
+#
+# The 'backend' dir should not be required if we finally drop
+# rendering calls from the parser (see https://savannah.gnu.org/task/?5837)
+#
 INCLUDES = \
+       -I$(top_srcdir)/backend \
        -I$(top_srcdir)/server \
        -I$(top_srcdir)/server/swf \
        -I$(top_srcdir)/server/parser \

Index: backend/render_handler.h
===================================================================
RCS file: backend/render_handler.h
diff -N backend/render_handler.h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ backend/render_handler.h    26 Sep 2006 15:08:06 -0000      1.1
@@ -0,0 +1,177 @@
+// 
+//   Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+// 
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+// Linking Gnash statically or dynamically with other modules is making a
+// combined work based on Gnash. Thus, the terms and conditions of the GNU
+// General Public License cover the whole combination.
+//
+// As a special exception, the copyright holders of Gnash give you
+// permission to combine Gnash with free software programs or libraries
+// that are released under the GNU LGPL and with code included in any
+// release of Talkback distributed by the Mozilla Foundation. You may
+// copy and distribute such a system following the terms of the GNU GPL
+// for all but the LGPL-covered parts and Talkback, and following the
+// LGPL for the LGPL-covered parts.
+//
+// Note that people who make modified versions of Gnash are not obligated
+// to grant this special exception for their modified versions; it is their
+// choice whether to do so. The GNU General Public License gives permission
+// to release a modified version without this exception; this exception
+// also makes it possible to release a modified version which carries
+// forward this exception.
+// 
+//
+
+#ifndef RENDER_HANDLER_H
+#define RENDER_HANDLER_H
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tu_config.h" // for DSOEXPORT
+
+// Forward declarations.
+namespace gnash {
+       class bitmap_info;
+       class rect;
+       class rgba;
+       class matrix;
+       class cxform;
+}
+// @@ forward decl to avoid including base/image.h; TODO change the
+// render_handler interface to not depend on these classes at all.
+namespace image { class image_base; class rgb; class rgba; }
+
+namespace gnash {
+
+/// You must define a subclass of render_handler, and pass an
+/// instance to set_render_handler().
+class DSOEXPORT render_handler
+{
+public:
+       virtual ~render_handler() {}
+
+       // Your handler should return these with a ref-count of 0.  (@@ is that 
the right policy?)
+
+       /// \brief
+       ///  Create a bitmap_info so that it contains an alpha texture
+       /// with the given data (1 byte per texel).
+       //
+       /// Munges *data (in order to make mipmaps)!!
+       ///
+       virtual bitmap_info*    create_bitmap_info_alpha(int w, int h, unsigned 
char* data) = 0;
+
+       /// \brief
+       /// Given an image, returns a pointer to a bitmap_info class
+       /// that can later be passed to fill_styleX_bitmap(), to set a
+       /// bitmap fill style.
+       virtual bitmap_info*    create_bitmap_info_rgb(image::rgb* im) = 0;
+
+       /// \brief
+       /// Given an image, returns a pointer to a bitmap_info class
+       /// that can later be passed to fill_style_bitmap(), to set a
+       /// bitmap fill style.
+       //
+       /// This version takes an image with an alpha channel.
+       ///
+       virtual bitmap_info*    create_bitmap_info_rgba(image::rgba* im) = 0;
+
+       /// Delete the given bitmap info class.
+       virtual void    delete_bitmap_info(bitmap_info* bi) = 0;
+               
+       /// Bracket the displaying of a frame from a movie.
+       //
+       /// Fill the background color, and set up default
+       /// transforms, etc.
+       ///
+       virtual void    begin_display(
+               rgba background_color,
+               int viewport_x0, int viewport_y0,
+               int viewport_width, int viewport_height,
+               float x0, float x1, float y0, float y1) = 0;
+
+       virtual void    end_display() = 0;
+               
+       /// Geometric transforms for mesh and line_strip rendering.
+       virtual void    set_matrix(const matrix& m) = 0;
+
+       /// Color transforms for mesh and line_strip rendering.
+       virtual void    set_cxform(const cxform& cx) = 0;
+               
+       /// Draw triangles using the current fill-style 0.
+       //
+       /// Clears the style list after rendering.
+       ///
+       /// coords is a list of (x,y) coordinate pairs, in
+       /// triangle-strip order.  The type of the array should
+       /// be int16_t[vertex_count*2]
+       ///
+       virtual void    draw_mesh_strip(const void* coords, int vertex_count) = 
0;
+               
+       /// Draw a line-strip using the current line style.
+       //
+       /// Clear the style list after rendering.
+       ///
+       /// Coords is a list of (x,y) coordinate pairs, in
+       /// sequence.  Each coord is a 16-bit signed integer.
+       ///
+       virtual void    draw_line_strip(const void* coords, int vertex_count) = 
0;
+               
+       /// Set line and fill styles for mesh & line_strip rendering.
+       enum bitmap_wrap_mode
+       {
+               WRAP_REPEAT,
+               WRAP_CLAMP
+       };
+       virtual void    fill_style_disable(int fill_side) = 0;
+       virtual void    fill_style_color(int fill_side, rgba color) = 0;
+       virtual void    fill_style_bitmap(int fill_side, const bitmap_info* bi, 
const matrix& m, bitmap_wrap_mode wm) = 0;
+               
+       virtual void    line_style_disable() = 0;
+       virtual void    line_style_color(rgba color) = 0;
+       virtual void    line_style_width(float width) = 0;
+               
+       /// Special function to draw a rectangular bitmap.
+       //
+       /// Intended for textured glyph rendering.  Ignores
+       /// current transforms.
+       ///
+       virtual void    draw_bitmap(
+               const matrix&           m,
+               const bitmap_info*      bi,
+               const rect&             coords,
+               const rect&             uv_coords,
+               rgba                    color) = 0;
+               
+       virtual void    set_antialiased(bool enable) = 0;
+               
+       virtual void begin_submit_mask() = 0;
+       virtual void end_submit_mask() = 0;
+       virtual void disable_mask() = 0;
+};
+
+
+
+}      // namespace gnash
+
+#endif // RENDER_HANDLER_H
+
+
+// Local Variables:
+// mode: C++
+// indent-tabs-mode: t
+// End:




reply via email to

[Prev in Thread] Current Thread [Next in Thread]