[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog configure.ac gui/Makefile.am gu...
From: |
Bastiaan Jacques |
Subject: |
[Gnash-commit] gnash ChangeLog configure.ac gui/Makefile.am gu... |
Date: |
Mon, 16 Oct 2006 15:27:53 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Bastiaan Jacques <bjacques> 06/10/16 15:27:53
Modified files:
. : ChangeLog configure.ac
gui : Makefile.am README gnash.cpp sdl.cpp
sdl_cairo_glue.cpp sdl_cairo_glue.h sdl_glue.h
sdl_ogl_glue.cpp sdl_ogl_glue.h sdlsup.h
Added files:
gui : sdl_agg_glue.cpp sdl_agg_glue.h
Log message:
* configure.ac: Allow SDL-GUI to be built with Agg. Fix typo.
* gui: Implement the Agg renderer for SDL-GUI. This does not yet
include region updating.
* gui/README: Update to reflect recent changes.
* gui/gnash.cpp: Remove assertion for invalid bit depths.
Renderer
glues must decide if a bit depths is appriopriate and signal
the user
if necessary.
* gui/sdl_cairo_glue{.cpp, .h}: Remove OpenGL code.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.1240&r2=1.1241
http://cvs.savannah.gnu.org/viewcvs/gnash/configure.ac?cvsroot=gnash&r1=1.159&r2=1.160
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/Makefile.am?cvsroot=gnash&r1=1.35&r2=1.36
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/README?cvsroot=gnash&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gnash.cpp?cvsroot=gnash&r1=1.47&r2=1.48
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/sdl.cpp?cvsroot=gnash&r1=1.41&r2=1.42
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/sdl_cairo_glue.cpp?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/sdl_cairo_glue.h?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/sdl_glue.h?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/sdl_ogl_glue.cpp?cvsroot=gnash&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/sdl_ogl_glue.h?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/sdlsup.h?cvsroot=gnash&r1=1.17&r2=1.18
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/sdl_agg_glue.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/sdl_agg_glue.h?cvsroot=gnash&rev=1.1
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.1240
retrieving revision 1.1241
diff -u -b -r1.1240 -r1.1241
--- ChangeLog 16 Oct 2006 14:41:30 -0000 1.1240
+++ ChangeLog 16 Oct 2006 15:27:53 -0000 1.1241
@@ -66,6 +66,14 @@
change to subclasses. Also fix some typos.
* plugin/klash/Makefile.am: Deprecate the klash binary from
plugins/klash in favour of gui/klash.
+ * configure.ac: Allow SDL-GUI to be built with Agg. Fix typo.
+ * gui: Implement the Agg renderer for SDL-GUI. This does not yet
+ include region updating.
+ * gui/README: Update to reflect recent changes.
+ * gui/gnash.cpp: Remove assertion for invalid bit depths. Renderer
+ glues must decide if a bit depths is appriopriate and signal the user
+ if necessary.
+ * gui/sdl_cairo_glue{.cpp, .h}: Remove OpenGL code.
2006-10-16 Markus Gothe <address@hidden>
Index: configure.ac
===================================================================
RCS file: /sources/gnash/gnash/configure.ac,v
retrieving revision 1.159
retrieving revision 1.160
diff -u -b -r1.159 -r1.160
--- configure.ac 16 Oct 2006 12:25:07 -0000 1.159
+++ configure.ac 16 Oct 2006 15:27:53 -0000 1.160
@@ -33,7 +33,7 @@
dnl also makes it possible to release a modified version which carries
dnl forward this exception.
-dnl $Id: configure.ac,v 1.159 2006/10/16 12:25:07 bjacques Exp $
+dnl $Id: configure.ac,v 1.160 2006/10/16 15:27:53 bjacques Exp $
AC_PREREQ(2.50)
AC_INIT(gnash, 0.7.1-cvs)
@@ -214,7 +214,7 @@
AM_CONDITIONAL(USE_RENDERER_CAIRO, test x$renderer = xcairo)
if test x$renderer = xagg; then
- if test x"$gui" != xfb -a x"$gui" != xgtk; then
+ if test x"$gui" != xfb -a x"$gui" != xgtk -a x"$gui" != xsdl; then
AC_MSG_ERROR([agg renderer is only supported by fb and gtk gui]);
fi
AC_DEFINE([RENDERER_AGG], [], [Use AntiGrain renderer])
@@ -1157,7 +1157,7 @@
dnl nogo=true
fi
else
- echo "Your installtion of AGG appears to be a version older than 2.4.\
+ echo "Your installation of AGG appears to be a version older than 2.4. \
Please upgrade to AGG 2.4 or greater."
fi
fi
Index: gui/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/gui/Makefile.am,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -b -r1.35 -r1.36
--- gui/Makefile.am 15 Oct 2006 14:26:05 -0000 1.35
+++ gui/Makefile.am 16 Oct 2006 15:27:53 -0000 1.36
@@ -35,7 +35,7 @@
# forward this exception.
#
-# $Id: Makefile.am,v 1.35 2006/10/15 14:26:05 bjacques Exp $
+# $Id: Makefile.am,v 1.36 2006/10/16 15:27:53 bjacques Exp $
AUTOMAKE_OPTIONS =
@@ -106,8 +106,10 @@
INCLUDES += $(AGG_CFLAGS)
AM_LDFLAGS += $(AGG_LIBS)
GTK_AGG_SRCS = gtk_glue_agg.cpp gtk_glue_agg.h
+ SDL_AGG_SRCS = sdl_agg_glue.cpp sdl_agg_glue.h
else
GTK_AGG_SRCS =
+ SDL_AGG_SRCS =
endif
if USE_GUI_GTK
@@ -119,7 +121,7 @@
endif
if USE_GUI_SDL
- SDL_SRCS = sdl.cpp sdlsup.h sdl_glue.h $(SDL_CAIRO_SRCS) $(SDL_OPENGL_SRCS)
+ SDL_SRCS = sdl.cpp sdlsup.h sdl_glue.h $(SDL_CAIRO_SRCS) $(SDL_OPENGL_SRCS)
$(SDL_AGG_SRCS)
else
SDL_SRCS =
endif
Index: gui/README
===================================================================
RCS file: /sources/gnash/gnash/gui/README,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- gui/README 7 Oct 2006 02:54:24 -0000 1.4
+++ gui/README 16 Oct 2006 15:27:53 -0000 1.5
@@ -30,21 +30,21 @@
STATUS
GTK2:
-- implemented both OpenGL and Cairo backends.
-- Events work (mouse and some keyboard ones).
+- implemented OpenGL, Agg and Cairo backends.
+- Events work.
- Pop-up menu is available.
-- Firefox plugin works!
+- Firefox plugin works.
SDL:
-- OpenGL and Cairo.
+- OpenGL, Agg and Cairo backends.
- Mouse events work (keyboard events don't).
- There's no pop-up menu (and there probably never will be one).
-- The Firefox plugin is not available for this frontend, because
- implementing it would develop a dependency on GTK2.
+- The Firefox plugin is not available for this frontend.
-
-QT:
-- Unimplemented. (Klash plugin may still work.)
+QT/KDE:
+- OpenGL backend.
+- A popup menu is available.
+- Klash plugin for konqueror is available.
FLTK:
- Doesn't work just yet.
Index: gui/gnash.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/gnash.cpp,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -b -r1.47 -r1.48
--- gui/gnash.cpp 5 Oct 2006 10:10:39 -0000 1.47
+++ gui/gnash.cpp 16 Oct 2006 15:27:53 -0000 1.48
@@ -251,7 +251,6 @@
{
int bit_depth;
bit_depth = atoi(optarg);
- assert (!bit_depth || bit_depth == 16 || bit_depth == 32);
player.setBitDepth(bit_depth);
break;
}
Index: gui/sdl.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/sdl.cpp,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -b -r1.41 -r1.42
--- gui/sdl.cpp 14 Oct 2006 03:28:17 -0000 1.41
+++ gui/sdl.cpp 16 Oct 2006 15:27:53 -0000 1.42
@@ -35,7 +35,7 @@
//
//
-/* $Id: sdl.cpp,v 1.41 2006/10/14 03:28:17 nihilus Exp $ */
+/* $Id: sdl.cpp,v 1.42 2006/10/16 15:27:53 bjacques Exp $ */
// XXXbjacques: Screw up the indentation in this file, and you're dead. And by
// screw up, I mean not adhering the indentation used throughout
@@ -219,11 +219,9 @@
SDL_EnableKeyRepeat(250, 33);
- // XXX instantiate _glue object first
-
_glue.init(argc, argv);
- _renderer = _glue.createRenderHandler();
+ _renderer = _glue.createRenderHandler(_depth);
return false;
}
@@ -246,7 +244,7 @@
sdl_flags |= SDL_NOFRAME;
}
- _glue.prepDrawingArea(_width, _height, _depth, sdl_flags);
+ _glue.prepDrawingArea(_width, _height, sdl_flags);
set_render_handler(_renderer);
Index: gui/sdl_cairo_glue.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/sdl_cairo_glue.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- gui/sdl_cairo_glue.cpp 13 Oct 2006 16:46:23 -0000 1.1
+++ gui/sdl_cairo_glue.cpp 16 Oct 2006 15:27:53 -0000 1.2
@@ -46,9 +46,6 @@
{
SdlCairoGlue::SdlCairoGlue()
-#ifdef FIX_I810_LOD_BIAS
- : _tex_lod_bias(-1.2f)
-#endif
{
// GNASH_REPORT_FUNCTION;
}
@@ -67,21 +64,15 @@
SdlCairoGlue::init(int argc, char** argv[])
{
// GNASH_REPORT_FUNCTION;
-#ifdef FIX_I810_LOD_BIAS
- int c = getopt (argc, *argv, "m:");
- if (c == 'm') {
- _tex_lod_bias = (float) atof(optarg);
- }
-#endif
-
return true;
}
render_handler*
-SdlCairoGlue::createRenderHandler()
+SdlCairoGlue::createRenderHandler(int depth)
{
// GNASH_REPORT_FUNCTION;
+ _bpp = depth;
return renderer::cairo::create_handler();
@@ -89,9 +80,9 @@
bool
-SdlCairoGlue::prepDrawingArea(int width, int height, int depth, uint32_t
sdl_flags)
+SdlCairoGlue::prepDrawingArea(int width, int height, uint32_t sdl_flags)
{
- _screen = SDL_SetVideoMode(width, height, depth, sdl_flags |
SDL_SWSURFACE);
+ _screen = SDL_SetVideoMode(width, height, _bpp, sdl_flags | SDL_SWSURFACE);
if (!_screen) {
fprintf(stderr, "SDL_SetVideoMode() failed.\n");
@@ -119,7 +110,7 @@
amask = 0xff000000;
_sdl_surface = SDL_CreateRGBSurfaceFrom((void *) _render_image, width,
height,
- depth, stride, rmask, gmask, bmask,
amask);
+ _bpp, stride, rmask, gmask, bmask,
amask);
assert(_sdl_surface);
return true;
Index: gui/sdl_cairo_glue.h
===================================================================
RCS file: /sources/gnash/gnash/gui/sdl_cairo_glue.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- gui/sdl_cairo_glue.h 13 Oct 2006 16:46:23 -0000 1.1
+++ gui/sdl_cairo_glue.h 16 Oct 2006 15:27:53 -0000 1.2
@@ -54,8 +54,8 @@
virtual ~SdlCairoGlue();
bool init(int argc, char **argv[]);
- render_handler* createRenderHandler();
- bool prepDrawingArea(int width, int height, int depth, uint32_t sdl_flags);
+ render_handler* createRenderHandler( int depth);
+ bool prepDrawingArea(int width, int height, uint32_t sdl_flags);
uint32_t maskFlags(uint32_t sdl_flags);
void render();
private:
Index: gui/sdl_glue.h
===================================================================
RCS file: /sources/gnash/gnash/gui/sdl_glue.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- gui/sdl_glue.h 13 Oct 2006 16:46:23 -0000 1.1
+++ gui/sdl_glue.h 16 Oct 2006 15:27:53 -0000 1.2
@@ -46,9 +46,11 @@
virtual ~SdlGlue() { }
virtual bool init(int argc, char **argv[]) = 0;
- virtual bool prepDrawingArea(int width, int height, int depth, uint32_t
sdl_flags) = 0;
- virtual render_handler* createRenderHandler() = 0;
+ virtual bool prepDrawingArea(int width, int height, uint32_t sdl_flags) =
0;
+ virtual render_handler* createRenderHandler(int depth) = 0;
virtual void render() = 0;
+ protected:
+ int _bpp;
};
} // namespace gnash
Index: gui/sdl_ogl_glue.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/sdl_ogl_glue.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- gui/sdl_ogl_glue.cpp 15 Oct 2006 15:55:37 -0000 1.3
+++ gui/sdl_ogl_glue.cpp 16 Oct 2006 15:27:53 -0000 1.4
@@ -83,11 +83,11 @@
render_handler*
-SdlOglGlue::createRenderHandler()
+SdlOglGlue::createRenderHandler(int depth)
{
// GNASH_REPORT_FUNCTION;
-// ogl initialisation?
+ _bpp = depth;
render_handler* renderer = create_render_handler_ogl();
@@ -99,9 +99,9 @@
}
bool
-SdlOglGlue::prepDrawingArea(int width, int height, int depth, uint32_t
sdl_flags)
+SdlOglGlue::prepDrawingArea(int width, int height, uint32_t sdl_flags)
{
- if (depth == 16) {
+ if (_bpp == 16) {
// 16-bit color, surface creation is likely to succeed.
SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 5);
SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 5);
@@ -124,7 +124,7 @@
SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 1);
}
- SDL_SetVideoMode(width, height, depth, sdl_flags | SDL_OPENGL);
+ SDL_SetVideoMode(width, height, _bpp, sdl_flags | SDL_OPENGL);
// Turn on alpha blending.
glEnable(GL_BLEND);
Index: gui/sdl_ogl_glue.h
===================================================================
RCS file: /sources/gnash/gnash/gui/sdl_ogl_glue.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- gui/sdl_ogl_glue.h 13 Oct 2006 16:46:23 -0000 1.1
+++ gui/sdl_ogl_glue.h 16 Oct 2006 15:27:53 -0000 1.2
@@ -53,8 +53,8 @@
virtual ~SdlOglGlue();
bool init(int argc, char **argv[]);
- render_handler* createRenderHandler();
- bool prepDrawingArea(int width, int height, int depth, uint32_t sdl_flags);
+ render_handler* createRenderHandler( int depth);
+ bool prepDrawingArea(int width, int height, uint32_t sdl_flags);
void render();
private:
#ifdef FIX_I810_LOD_BIAS
Index: gui/sdlsup.h
===================================================================
RCS file: /sources/gnash/gnash/gui/sdlsup.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- gui/sdlsup.h 13 Oct 2006 16:46:23 -0000 1.17
+++ gui/sdlsup.h 16 Oct 2006 15:27:53 -0000 1.18
@@ -48,10 +48,12 @@
#include "SDL.h"
#include "SDL_thread.h"
-#ifdef RENDERER_CAIRO
-#include "sdl_cairo_glue.h"
+#ifdef RENDERER_AGG
+# include "sdl_agg_glue.h"
+#elif defined(RENDERER_CAIRO)
+# include "sdl_cairo_glue.h"
#elif defined(RENDERER_OPENGL)
-#include "sdl_ogl_glue.h"
+# include "sdl_ogl_glue.h"
#endif
@@ -89,7 +91,9 @@
/// Handle VIDEOEXPOSE event
void expose_event();
-#ifdef RENDERER_CAIRO
+#ifdef RENDERER_AGG
+ SdlAggGlue _glue;
+#elif defined(RENDERER_CAIRO)
SdlCairoGlue _glue;
#elif defined(RENDERER_OPENGL)
SdlOglGlue _glue;
Index: gui/sdl_agg_glue.cpp
===================================================================
RCS file: gui/sdl_agg_glue.cpp
diff -N gui/sdl_agg_glue.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gui/sdl_agg_glue.cpp 16 Oct 2006 15:27:53 -0000 1.1
@@ -0,0 +1,172 @@
+//
+// 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.
+//
+//
+
+#include "sdl_agg_glue.h"
+#include "log.h"
+#include "render_handler.h"
+#include "render_handler_agg.h"
+#include <errno.h>
+#include <ostream>
+
+using namespace std;
+
+
+namespace gnash
+{
+
+SdlAggGlue::SdlAggGlue()
+{
+// GNASH_REPORT_FUNCTION;
+}
+
+SdlAggGlue::~SdlAggGlue()
+{
+// GNASH_REPORT_FUNCTION;
+ SDL_FreeSurface(_sdl_surface);
+ SDL_FreeSurface(_screen);
+ free(_offscreenbuf);
+}
+
+bool
+SdlAggGlue::init(int argc, char** argv[])
+{
+// GNASH_REPORT_FUNCTION;
+
+ return true;
+}
+
+
+render_handler*
+SdlAggGlue::createRenderHandler(int bpp)
+{
+// GNASH_REPORT_FUNCTION;
+
+ _bpp = bpp;
+
+ switch (_bpp) {
+ case 32:
+ _agg_renderer = create_render_handler_agg("RGBA32");
+ break;
+ case 24:
+ _agg_renderer = create_render_handler_agg("RGB24");
+ break;
+ case 16:
+ _agg_renderer = create_render_handler_agg("RGBA16");
+ break;
+ default:
+ dbglogfile << "ERROR: bit depth must be 16, 24 or 32 bits." <<
std::endl;
+ assert(0);
+ }
+ return _agg_renderer;
+}
+
+
+bool
+SdlAggGlue::prepDrawingArea(int width, int height, uint32_t sdl_flags)
+{
+ int depth_bytes = _bpp / 8;
+
+ assert(_bpp % 8 == 0);
+
+ _screen = SDL_SetVideoMode(width, height, _bpp, sdl_flags | SDL_SWSURFACE);
+
+ if (!_screen) {
+ fprintf(stderr, "SDL_SetVideoMode() failed.\n");
+ exit(1);
+ }
+
+ int stride = width * depth_bytes;
+
+ uint32_t rmask, gmask, bmask, amask;
+
+ switch(_bpp) {
+ case 32: // RGBA32
+ rmask = 0xFF;
+ gmask = 0xFF << 8;
+ bmask = 0xFF << 16;
+ amask = 0xFF << 24;
+ break;
+ case 24: // RGB24
+ rmask = 0xFF;
+ gmask = 0xFF << 8;
+ bmask = 0xFF << 16;
+ amask = 0;
+ break;
+ case 16: // RGB565: 5 bits for red, 6 bits for green, and 5 bits for blue
+ rmask = 0x1F << 11;
+ gmask = 0x3F << 5;
+ bmask = 0x1F;
+ amask = 0;
+ break;
+ default:
+ assert(0);
+ }
+
+#define CHUNK_SIZE (100 * 100 * depth_bytes)
+
+ int bufsize = static_cast<int>(width * height * depth_bytes / CHUNK_SIZE +
1) * CHUNK_SIZE;
+
+ _offscreenbuf = new unsigned char[bufsize];
+
+ log_msg("SDL-AGG: %i bytes offscreen buffer allocated\n", bufsize);
+
+
+ // Only the AGG renderer has the function init_buffer, which is *not* part
of
+ // the renderer api. It allows us to change the renderers movie size (and
buffer
+ // address) during run-time.
+ render_handler_agg_base * renderer =
+ static_cast<render_handler_agg_base *>(_agg_renderer);
+ renderer->init_buffer(_offscreenbuf, bufsize, width, height);
+
+
+ _sdl_surface = SDL_CreateRGBSurfaceFrom((void *) _offscreenbuf, width,
height,
+ _bpp, stride, rmask, gmask, bmask,
amask);
+ assert(_sdl_surface);
+
+ return true;
+}
+
+void
+SdlAggGlue::render()
+{
+// GNASH_REPORT_FUNCTION;
+ SDL_BlitSurface(_sdl_surface, NULL, _screen, NULL);
+ SDL_UpdateRect (_screen, 0, 0, 0, 0);
+}
+
+
+} // namespace gnash
Index: gui/sdl_agg_glue.h
===================================================================
RCS file: gui/sdl_agg_glue.h
diff -N gui/sdl_agg_glue.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gui/sdl_agg_glue.h 16 Oct 2006 15:27:53 -0000 1.1
@@ -0,0 +1,68 @@
+//
+// 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.
+//
+//
+
+#include "sdl_glue.h"
+#include <SDL.h>
+
+
+
+using namespace std;
+
+
+namespace gnash
+{
+
+class SdlAggGlue : public SdlGlue
+{
+ public:
+ SdlAggGlue();
+ virtual ~SdlAggGlue();
+
+ bool init(int argc, char **argv[]);
+ render_handler* createRenderHandler(int depth);
+ bool prepDrawingArea(int width, int height, uint32_t sdl_flags);
+ uint32_t maskFlags(uint32_t sdl_flags);
+ void render();
+ void render(int minx, int miny, int maxx, int maxy);
+ private:
+ SDL_Surface *_sdl_surface;
+ unsigned char *_offscreenbuf;
+ SDL_Surface *_screen;
+ render_handler *_agg_renderer;
+};
+
+}