gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] [SCM] Gnash branch, openvg, updated. 8a515717b396cdc85c0e


From: Rob Savoye
Subject: [Gnash-commit] [SCM] Gnash branch, openvg, updated. 8a515717b396cdc85c0e8281e4da5e933c7fff73
Date: Tue, 05 Oct 2010 19:40:00 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, openvg has been updated
       via  8a515717b396cdc85c0e8281e4da5e933c7fff73 (commit)
       via  ab39c753a4beac7c8172b5b7c5a028ce1633de02 (commit)
       via  f4518c77b43c81e23b2f9e8295bb14da948e8279 (commit)
       via  4e324cbaf3cc1f63994e69e2278acf9a82e4ab56 (commit)
       via  fe0be50449ffd55b7d6029d25cf326f350e488b6 (commit)
       via  1a09e20e5b7766058b7a3b86c2ef724782e65d64 (commit)
       via  3877e91f2cdb22c18c1fe0785ae14e0a6a80a289 (commit)
       via  dc81ff0f78d92f94f8a4c92436388565f5838ffc (commit)
       via  dbac5e22c0db908bf1d9d7049664c9bcdc9c1b6a (commit)
       via  d3e84d1e13a06372fdd0cd841d2213e316a704ea (commit)
      from  4577afa216f49320f9360b1c704a056b36ba35c0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=8a515717b396cdc85c0e8281e4da5e933c7fff73


commit 8a515717b396cdc85c0e8281e4da5e933c7fff73
Author: Rob Savoye <address@hidden>
Date:   Tue Oct 5 13:39:36 2010 -0600

    separate out gles1 from gles2

diff --git a/configure.ac b/configure.ac
index 651b87e..b050e0f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -906,7 +906,8 @@ dnl -------------------------------
 input_events=
 dnl By default, we want to to build all renderers
 build_ovg=no
-build_gles=no
+build_gles1=no
+build_gles2=no
 build_ogl=yes
 build_agg=yes
 build_cairo=yes
@@ -927,7 +928,8 @@ AC_ARG_ENABLE(renderer,
   nrender=0
   build_ovg=no
   build_ogl=no
-  build_gles=no
+  build_gles1=no
+  build_gles2=no
   build_agg=no
   build_cairo=no
   while test -n "${enableval}" ; do
@@ -937,28 +939,36 @@ AC_ARG_ENABLE(renderer,
         renderer_list="none"
         build_ovg=no
         build_ogl=no
-        build_gles=no
+        build_gles1=no
+        build_gles2=no
         build_agg=no
         build_cairo=no
         nrender=1
         ;;
       all|ALL)
-        renderer_list="OpenGL, Cairo, AGG"
+        renderer_list="OpenGL, Cairo, AGG, OpenVG, OpenGLES1"
         build_ogl=yes
         build_agg=yes
         build_cairo=yes
         build_ovg=yes
-        nrender=4
+        build_gles1=yes
+        build_gles2=no
+        nrender=5
         ;;
       ogl|OGL|OpenGL|opengl)
         renderer_list="${renderer_list} OpenGL"
-        build_gles=no
         build_ogl=yes
         nrender=$((nrender+1))
         ;;
-      gles|GLES|GL-ES|gl-es)
-        renderer_list="${renderer_list} OpenGL-ES"
-        build_gles=yes
+      gles|GLES|gles1|GLES1)
+        renderer_list="${renderer_list} OpenGLES1"
+        build_gles1=yes
+        build_ogl=no
+        nrender=$((nrender+1))
+        ;;
+      gles2|GLES2)
+        renderer_list="${renderer_list} OpenGLES2"
+        build_gles2=yes
         build_ogl=no
         nrender=$((nrender+1))
         ;;
@@ -1061,7 +1071,8 @@ if test x$pixelformat = xall; then
 fi
 
 AM_CONDITIONAL(BUILD_OVG_RENDERER, [ test x$build_ovg = xyes ])
-AM_CONDITIONAL(BUILD_GLES_RENDERER, [ test x$build_gles = xyes ])
+AM_CONDITIONAL(BUILD_GLES1_RENDERER, [ test x$build_gles1 = xyes ])
+AM_CONDITIONAL(BUILD_GLES2_RENDERER, [ test x$build_gles2 = xyes ])
 AM_CONDITIONAL(BUILD_OGL_RENDERER, [ test x$build_ogl = xyes])
 AM_CONDITIONAL(BUILD_AGG_RENDERER, [ test x$build_agg = xyes ])
 AM_CONDITIONAL(BUILD_CAIRO_RENDERER, [ test x$build_cairo = xyes ])
@@ -1745,7 +1756,8 @@ if test x"${build_alp}" = xyes; then
 dnl  build_gtk=yes
   build_kde3=no
   build_ogl=no
-  build_gles=no
+  build_gles1=no
+  build_gles2=no
   build_agg=yes
 fi
 
@@ -2391,7 +2403,7 @@ AM_CONDITIONAL(NPAPI,   [test x"${npapi}" = xyes])
 AM_CONDITIONAL(KPARTS3, [test x"${build_kparts3}" = xyes])
 AM_CONDITIONAL(KPARTS4, [test x"${build_kparts4}" = xyes])
 
-if test x"${build_gles}" = xyes; then
+if test x"${build_gles1}" = xyes -o x"${build_gles2}" = xyes; then
   GNASH_PKG_FIND(EGL, [EGL/egl.h], [EGL library], eglGetDisplay)
   GNASH_PATH_GLES
 fi
@@ -3142,16 +3154,28 @@ if test x"${build_ogl}" = x"yes"; then
   fi
 fi
 
-if test x"${build_gles}" = x"yes"; then
-  if test x"${has_gles}" != x; then
-    if test x"$GLES_CFLAGS" != x; then
-      echo "        OpenGL-ES flags are: $GLES_CFLAGS"
+if test x"${build_gles1}" = x"yes" -o x"${build_gles2}" = xyes; then
+  if test x"${has_gles1}" = xyes; then
+    if test x"${GLES1_CFLAGS}" != x; then
+      echo "        OpenGLES1 flags are: ${GLES1_CFLAGS}"
+    else
+      echo "        OpenGLES1 flags are: default include path"
+    fi
+    echo "        OpenGLES1 libs are: ${GLES1_LIBS}"
+  else
+      echo "        ERROR: No OpenGLES1 development package installed!" >&3
+      echo "               You need to install the this from source proobably" 
>&3
+      echo "               or use a different renderer with 
--enable-renderer=" >&3
+  fi
+  if test x"${has_gles2}" = xyes; then
+    if test x"${GLES2_CFLAGS}" != x; then
+      echo "        OpenGLES2 flags are: ${GLES2_CFLAGS}"
     else
-      echo "        OpenGL-ES flags are: default include path"
+      echo "        OpenGLES2 flags are: default include path"
     fi
-    echo "        OpenGL-ES libs are: $GLES_LIBS"
+    echo "        OpenGLES2 libs are: ${GLES2_LIBS}"
   else
-      echo "        ERROR: No OpenGL-ES development package installed!" >&3
+      echo "        ERROR: No OpenGLES2 development package installed!" >&3
       echo "               You need to install the this from source proobably" 
>&3
       echo "               or use a different renderer with 
--enable-renderer=" >&3
   fi

http://git.savannah.gnu.org/cgit//commit/?id=ab39c753a4beac7c8172b5b7c5a028ce1633de02


commit ab39c753a4beac7c8172b5b7c5a028ce1633de02
Author: Rob Savoye <address@hidden>
Date:   Tue Oct 5 13:39:13 2010 -0600

    separate out gles1 from gles2

diff --git a/Makefile.am b/Makefile.am
index ff234bf..524fd45 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -389,6 +389,18 @@ if BUILD_OGL_RENDERER
        @echo " OPENGL_CFLAGS is $(OPENGL_CFLAGS)"
        @echo " OPENGL_LIBS is $(OPENGL_LIBS)"
 endif
+if BUILD_OVG_RENDERER
+       @echo " OVG_CFLAGS is $(OVG_CFLAGS)"
+       @echo " OVG_LIBS is $(OVG_LIBS)"
+endif
+if BUILD_GLES1_RENDERER
+       @echo " GLES1_CFLAGS is $(GLES1_CFLAGS)"
+       @echo " GLES1_LIBS is $(GLES1_LIBS)"
+endif
+if BUILD_GLES2_RENDERER
+       @echo " GLES2_CFLAGS is $(GLES2_CFLAGS)"
+       @echo " GLES2_LIBS is $(GLES2_LIBS)"
+endif
 if BUILD_AGG_RENDERER
        @echo " AGG_CFLAGS is $(AGG_CFLAGS)"
        @echo " AGG_LIBS is $(AGG_LIBS)"

http://git.savannah.gnu.org/cgit//commit/?id=f4518c77b43c81e23b2f9e8295bb14da948e8279


commit f4518c77b43c81e23b2f9e8295bb14da948e8279
Author: Rob Savoye <address@hidden>
Date:   Tue Oct 5 13:38:36 2010 -0600

    separate out gles1 from gles2, disable Mali tools for now, use Mesa instead

diff --git a/gui/fb/fb.am b/gui/fb/fb.am
index 019e097..26f3dfb 100644
--- a/gui/fb/fb.am
+++ b/gui/fb/fb.am
@@ -47,7 +47,7 @@ fb_gnash_LDADD += $(OPENVG_LIBS) $(EGL_LIBS)
 endif  # BUILD_OVG_RENDERER
 
 # This supports only OpenGL-ES 1.1 with EGL support.
-if BUILD_GLES_RENDERER
+if BUILD_GLES1_RENDERER
 fb_gnash_SOURCES += fb/fb_glue_gles.cpp fb/fb_glue_gles.h
 fb_gnash_CPPFLAGS += $(GLES_CFLAGS) $(EGL_CFLAGS)
 fb_gnash_LDADD += $(GLES_LIBS) $(EGL_LIBS)
diff --git a/gui/fb/fb_glue_gles.cpp b/gui/fb/fb_glue_gles.cpp
index ce7dd5c..cd78aea 100644
--- a/gui/fb/fb_glue_gles.cpp
+++ b/gui/fb/fb_glue_gles.cpp
@@ -21,12 +21,14 @@
 #endif
 
 // gles-1.0c for Linux
-#ifdef HAVE_GLES_GL_H
+#ifdef HAVE_GLES1_GL_H
 # include <GLES/gl.h>
 #endif
-#ifdef HAVE_GLES_EGL_H
+#ifdef HAVE_GLES1_EGL_H
 #include <GLES/egl.h>
 #endif
+
+#if 0
 // Mali Developer Tools for ARM 1.x
 #ifdef HAVE_EGL_EGL_H
 # include <EGL/egl.h>
@@ -37,6 +39,7 @@
 # include <GLES2/gl2.h>
 # include <GLES2/gl2ext.h>
 #endif
+#endif
 
 #include "log.h"
 #include "fb_glue_gles.h"
diff --git a/gui/fb/fb_glue_gles.h b/gui/fb/fb_glue_gles.h
index 395a05a..e6a914b 100644
--- a/gui/fb/fb_glue_gles.h
+++ b/gui/fb/fb_glue_gles.h
@@ -24,12 +24,13 @@
 #endif
 
 // gles-1.0c for Linux
-#ifdef HAVE_GLES_GL_H
+#ifdef HAVE_GLES1_GL_H
 # include <GLES/gl.h>
 # endif
-#ifdef HAVE_GLES_EGL_H
+#ifdef HAVE_GLES1_EGL_H
 #include <GLES/egl.h>
 #endif
+#if 0
 // Mali Developer Tools for ARM 1.x
 #ifdef HAVE_EGL_EGL_H
 # include <EGL/egl.h>
@@ -40,6 +41,7 @@
 # include <GLES2/gl2.h>
 # include <GLES2/gl2ext.h>
 #endif
+#endif
 
 #include "fbsup.h"
 #include "render_handler_gles.h"

http://git.savannah.gnu.org/cgit//commit/?id=4e324cbaf3cc1f63994e69e2278acf9a82e4ab56


commit 4e324cbaf3cc1f63994e69e2278acf9a82e4ab56
Author: Rob Savoye <address@hidden>
Date:   Tue Oct 5 13:38:22 2010 -0600

    separate out gles1 from gles2, disable Mali tools for now, use Mesa instead

diff --git a/librender/Makefile.am b/librender/Makefile.am
index 6eb25e1..b6a300c 100644
--- a/librender/Makefile.am
+++ b/librender/Makefile.am
@@ -85,11 +85,16 @@ libgnashrender_la_SOURCES += Renderer_ovg.cpp
 libgnashrender_la_LIBADD += $(AGG_LIBS) $(LIBVA)
 endif
 
-if  BUILD_GLES_RENDERER
+if  BUILD_GLES1_RENDERER
 libgnashrender_la_SOURCES += Renderer_gles1.cpp 
 libgnashrender_la_LIBADD += $(AGG_LIBS) $(LIBVA)
 endif
 
+if  BUILD_GLES2_RENDERER
+libgnashrender_la_SOURCES += Renderer_gles2.cpp 
+libgnashrender_la_LIBADD += $(AGG_LIBS) $(LIBVA)
+endif
+
 if  BUILD_CAIRO_RENDERER
 libgnashrender_la_SOURCES += Renderer_cairo.cpp
 libgnashrender_la_LIBADD += $(CAIRO_LIBS)
diff --git a/librender/Renderer_gles1.cpp b/librender/Renderer_gles1.cpp
index fa9fc94..fa0b6b8 100644
--- a/librender/Renderer_gles1.cpp
+++ b/librender/Renderer_gles1.cpp
@@ -22,10 +22,10 @@
 #endif
 
 // gles-1.0c for Linux
-#ifdef HAVE_GLES_GL_H
+#ifdef HAVE_GLES1_GL_H
 # include <GLES/gl.h>
 #endif
-#ifdef HAVE_GLES_EGL_H
+#ifdef HAVE_GLES1_EGL_H
 # include <GLES/egl.h>
 #endif
 
diff --git a/librender/Renderer_gles1.h b/librender/Renderer_gles1.h
index 74f2854..e8e7ed9 100644
--- a/librender/Renderer_gles1.h
+++ b/librender/Renderer_gles1.h
@@ -16,18 +16,18 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 
-#ifndef GNASH_RENDER_HANDLER_GLES_H
-#define GNASH_RENDER_HANDLER_GLES_H
+#ifndef GNASH_RENDER_HANDLER_GLES1_H
+#define GNASH_RENDER_HANDLER_GLES1_H
 
 #ifdef HAVE_CONFIG_H
 #include "gnashconfig.h"
 #endif
 
 // gles-1.0c for Linux
-#ifdef HAVE_GLES_GL_H
+#ifdef HAVE_GLES1_GL_H
 # include <GLES/gl.h>
 #endif
-#ifdef HAVE_GLES_EGL_H
+#ifdef HAVE_GLES1_EGL_H
 #include <GLES/egl.h>
 #endif
 
@@ -138,7 +138,7 @@ DSOEXPORT Renderer* create_Renderer_gles(bool init = true);
 
 } // namespace gnash
 
-#endif // __RENDER_HANDLER_GLES_H__
+#endif // __RENDER_HANDLER_GLES1_H__
 
 // local Variables:
 // mode: C++
diff --git a/librender/render_handler_gles.h b/librender/render_handler_gles.h
index 359a5a0..dba2eef 100644
--- a/librender/render_handler_gles.h
+++ b/librender/render_handler_gles.h
@@ -28,12 +28,13 @@
 #endif
 
 // gles-1.0c for Linux
-#ifdef HAVE_GLES_GL_H
+#ifdef HAVE_GLES1_GL_H
 # include <GLES/gl.h>
 # endif
-#ifdef HAVE_GLES_EGL_H
+#ifdef HAVE_GLES1_EGL_H
 #include <GLES/egl.h>
 #endif
+#if 0
 // Mali Developer Tools for ARM 1.x
 #ifdef HAVE_GLES_EGL_H
 # include <GLES/egl.h>
@@ -44,6 +45,7 @@
 # include <GLES2/gl2.h>
 # include <GLES2/gl2ext.h>
 #endif
+#endif
 
 // #include <glues.h>
 

http://git.savannah.gnu.org/cgit//commit/?id=fe0be50449ffd55b7d6029d25cf326f350e488b6


commit fe0be50449ffd55b7d6029d25cf326f350e488b6
Author: Rob Savoye <address@hidden>
Date:   Tue Oct 5 13:36:24 2010 -0600

    add initial stubs

diff --git a/librender/Renderer_gles2.cpp b/librender/Renderer_gles2.cpp
new file mode 100644
index 0000000..6140e17
--- /dev/null
+++ b/librender/Renderer_gles2.cpp
@@ -0,0 +1,92 @@
+// 
+//   Copyright (C) 2010 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 3 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
+
+
+#ifdef HAVE_CONFIG_H
+#include "gnashconfig.h"
+#endif
+
+// gles-1.0c for Linux
+#ifdef HAVE_GLES1_GL_H
+# include <GLES/gl.h>
+#endif
+#ifdef HAVE_GLES1_EGL_H
+# include <GLES/egl.h>
+#endif
+
+#if 0
+// Mali Developer Tools for ARM 1.x
+#ifdef HAVE_EGL_EGL_H
+# include <EGL/egl.h>
+# include <EGL/eglext.h>
+#endif
+// Mali Developer Tools for ARM 2.x and Android 2.1
+#ifdef HAVE_GLES2_GL2_H
+# include <GLES2/gl2.h>
+# include <GLES2/gl2ext.h>
+#endif
+#endif
+
+#include <cstring>
+#include <cmath>
+
+#include <smart_ptr.h>
+#include "swf/ShapeRecord.h"
+#include "gnash.h"
+#include "RGBA.h"
+#include "GnashImage.h"
+#include "GnashTexture.h"
+#include "GnashNumeric.h"
+#include "log.h"
+#include "utility.h"
+#include "Range2d.h"
+#include "cxform.h"
+
+#include "Renderer_gles1.h"
+
+#include <boost/utility.hpp>
+#include <boost/bind.hpp>
+
+// Defined to 1 to disable (slow) anti-aliasing with the accumulation buffer
+#define NO_ANTIALIASING 1
+
+/// \file Renderer_gles.cpp
+/// \brief The OpenGL-ES renderer and related code.
+///
+
+// TODO:
+// - Profiling!
+// - Optimize code:
+// * Use display lists
+// * Use better suited standard containers
+// * convert to double at a later stage (oglVertex)
+// * keep data for less time
+// * implement hardware accelerated gradients. Most likely this will require
+//   the use of fragment shader language.
+
+// * The "Programming Tips" in the OpenGL "red book" discusses a coordinate 
system
+// that would give "exact two-dimensional rasterization". AGG uses a similar
+// system; consider the benefits and drawbacks of switching.
+
+namespace gnash {
+
+} // end of gnash namespace
+
+// local Variables:
+// mode: C++
+// indent-tabs-mode: nil
+// End:
diff --git a/librender/Renderer_gles2.h b/librender/Renderer_gles2.h
new file mode 100644
index 0000000..7dc0471
--- /dev/null
+++ b/librender/Renderer_gles2.h
@@ -0,0 +1,61 @@
+// 
+//   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 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 3 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
+
+#ifndef GNASH_RENDER_HANDLER_GLES2_H
+#define GNASH_RENDER_HANDLER_GLES2_H
+
+#ifdef HAVE_CONFIG_H
+#include "gnashconfig.h"
+#endif
+
+// gles-1.0c for Linux
+#ifdef HAVE_GLES1_GL_H
+# include <GLES/gl.h>
+#endif
+#ifdef HAVE_GLES1_EGL_H
+#include <GLES/egl.h>
+#endif
+
+#if 0
+// Mali Developer Tools for ARM 1.x
+#ifdef HAVE_EGL_EGL_H
+# include <EGL/egl.h>
+# include <EGL/eglext.h>
+#endif
+// Mali Developer Tools for ARM 2.x and Android 2.1
+#ifdef HAVE_GLES2_GL2_H
+# include <GLES2/gl2.h>
+# include <GLES2/gl2ext.h>
+#endif
+#endif
+
+#include <vector>
+
+#include "Renderer.h"
+#include "Geometry.h"
+
+namespace gnash {
+
+} // namespace gnash
+
+#endif // __RENDER_HANDLER_GLES2_H__
+
+// local Variables:
+// mode: C++
+// indent-tabs-mode: nil
+// End:

http://git.savannah.gnu.org/cgit//commit/?id=1a09e20e5b7766058b7a3b86c2ef724782e65d64


commit 1a09e20e5b7766058b7a3b86c2ef724782e65d64
Author: Rob Savoye <address@hidden>
Date:   Tue Oct 5 13:25:25 2010 -0600

    split up value for gles1 and gles2

diff --git a/macros/gles.m4 b/macros/gles.m4
index 64999bd..3b5a01b 100644
--- a/macros/gles.m4
+++ b/macros/gles.m4
@@ -18,10 +18,6 @@ AC_DEFUN([GNASH_PATH_GLES],
 [
   gles=yes
 
-  dnl This changes the default between OpenGL-ES 1.x and 2.x, which are
-  dnl somewhat incomatible with each other. gles1 or gles2 are all that's
-  dnl supported.
-  default_version=gles1
   dnl This changes the default flavor of OpenGL-ES implementations. If only
   dnl one is installed, it doesn't matter, but if you are a developer with
   dnl multiple OpenGL-ES implementations, you can use this to limit the
@@ -39,18 +35,29 @@ AC_DEFUN([GNASH_PATH_GLES],
   fi
 
   dnl Look for the headers.
-  AC_ARG_WITH(gles_includes, AC_HELP_STRING([--with-gles-includes], [directory 
where OpenGL-ES headers are]), with_gles_includes=${withval})
-  AC_CACHE_VAL(ac_cv_path_gles_includes,[
-    if test x"${with_gles_includes}" != x ; then
-      if test -f ${with_gles_includes}/GLES/egl.h -o -f 
${with_gles_includes}/GLES2/gl2.h ; then
-        ac_cv_path_gles_includes="-I`(cd ${with_gles_includes}; pwd)`"
+  AC_ARG_WITH(gles1_includes, AC_HELP_STRING([--with-gles1-includes], 
[directory where OpenGLES 1 headers are]), with_gles1_includes=${withval})
+  AC_CACHE_VAL(ac_cv_path_gles1_includes,[
+    if test x"${with_gles1_includes}" != x ; then
+      if test -f ${with_gles1_includes}/GLES/egl.h -o -f 
${with_gles1_includes}/GLES/gl.h; then
+        ac_cv_path_gles1_includes="-I`(cd ${with_gles1_includes}; pwd)`"
       else
-        AC_MSG_ERROR([${with_gles_includes} directory doesn't contain egl.h or 
gl2.h])
+        AC_MSG_ERROR([${with_gles1_includes} directory doesn't contain egl.h 
or gl.h])
       fi
     fi
   ])
 
-  dnl This gets reall fun, as all the implementations I could find
+  AC_ARG_WITH(gles2_includes, AC_HELP_STRING([--with-gles2-includes], 
[directory where OpenGLES 2 headers are]), with_gles2_includes=${withval})
+  AC_CACHE_VAL(ac_cv_path_gles2_includes,[
+    if test x"${with_gles2_includes}" != x ; then
+      if test -f ${with_gles2_includes}/GLES2/gl2.h ; then
+        ac_cv_path_gles2_includes="-I`(cd ${with_gles2_includes}; pwd)`"
+      else
+        AC_MSG_ERROR([${with_gles2_includes} directory doesn't contain gl2.h])
+      fi
+    fi
+  ])
+
+  dnl This gets really fun, as all the implementations I could find
   dnl have differences. OpenGL-ES 1.x by default doesn't have
   dnl Farmebuffer support, this is added by an extension. For
   dnl OpenGL-ES 2.x, this extension is now in the standard API.
@@ -70,57 +77,54 @@ AC_DEFUN([GNASH_PATH_GLES],
   dnl includes both OpenGL-ES 1.1 and 2.1, but with a twist. The
   dnl OpenGL-ES 1.x implementation is under the EGL, instead of the
   dnl GLES top level directory.
-  if test x"${ac_cv_path_gles_includes}" = x; then
+
+  if test x"${ac_cv_path_gles1_includes}" = x -o 
x"${ac_cv_path_gles2_includes}" = x; then
     AC_MSG_CHECKING([for OpenGL-ES headers])
     for i in ${newlist}; do
       dnl OpenGL-ES 1.x
-      if test x"${default_version}" = xgles1; then
+      if test x"${ac_cv_path_gles1_includes}" = x -a x"${build_gles1}" = xyes; 
then
         if test -f $i/GLES/gl.h; then
-          AC_DEFINE(HAVE_GLES_GL_H, [1], [Have OpenGL-ES GLES/gl.h])
-          AC_DEFINE([RENDERER_GLES], [], [Use OpenGL-ES version 1.x])
-          ac_cv_path_gles_includes="-I$i"
+          AC_DEFINE(HAVE_GLES1_GL_H, [1], [Have OpenGL-ES GLES/gl.h])
+          AC_DEFINE([RENDERER_GLES1], [], [Use OpenGL-ES version 1.x])
+          ac_cv_path_gles1_includes="-I$i"
           dnl Some implementations have this extension, which adds
           dnl framebuffer support.
           if test -f $i/GLES/glext.h; then
-            AC_DEFINE(HAVE_GLES_GLEXT_H, [1], [Have OpenGL-ES GLES/glext.h])
+            AC_DEFINE(HAVE_GLES1_GLEXT_H, [1], [Have OpenGL-ES GLES/glext.h])
           fi
           dnl If it contains the egl.h file, it's probably gles-10c,
           dnl if not, then it's probably the Android implementation.
           if test -f $i/GLES/egl.h; then
+            AC_DEFINE(HAVE_GLES1_EGL_H, [1], [Have OpenGLES 1 egl.h])
             config_flavor=10c
           else
             config_flavor=android
           fi
-        fi
-        if test -f $i/EGL/egl.h; then
-          AC_DEFINE(HAVE_EGL_EGL_H, [1], [Have OpenGL-ES EGL/egl.h])
-          ac_cv_path_gles_includes="-I$i"
-          dnl Only the Mali library has this header file.
-          if test -f $i/EGL/egl_native_types.h; then
-            config_flavor=mali
-          else
-            config_flavor=android
+          if test -f $i/EGL/egl.h; then
+            AC_DEFINE(HAVE_EGL_EGL_H, [1], [Have OpenGL-ES EGL/egl.h])
+            ac_cv_path_gles1_includes="-I$i"
+            dnl Only the Mali library has this header file.
+            if test -f $i/EGL/egl_native_types.h; then
+              config_flavor=mali
+            else
+              config_flavor=android
+            fi
           fi
         fi
       fi
-      dnl If no OpenGL-ES 1.x headers can be found, look for v2 files
-      if test x"${ac_cv_path_gles_includes}" = x; then
-        default_version=gles2
-      fi
       dnl OpenGL-ES 2.x
-      if test x"${default_version}" = xgles2; then
+      if test x"${ac_cv_path_gles2_includes}" = x -a x"${build_gles2}" = xyes; 
then
         if test -f $i/GLES2/gl2.h; then
-          AC_DEFINE(HAVE_GLES2_GL2_H, [1], [Have OpenGL-ES GLES2/gl2.h])
-          AC_DEFINE([RENDERER_GLES2], [], [Use OpenGL-ES v2 version 2])
-          ac_cv_path_gles_includes="-I$i"
+          AC_DEFINE(HAVE_GLES2_GL2_H, [1], [Have OpenGLES v2 GLES2/gl2.h])
+          AC_DEFINE([RENDERER_GLES2], [1], [Use OpenGLES v2 version 2])
+          ac_cv_path_gles2_includes="-I$i"
           dnl Both OpenGL-ES 2.1 implementations are similar enough
           dnl the flavor doesn't matter.
           config_flavor=android
         fi
         if test -f $i/EGL/egl.h; then
           AC_DEFINE(HAVE_EGL_EGL_H, [1], [Have OpenGL-ES EGL/egl.h])
-          AC_DEFINE([RENDERER_EGL], [], [Use OpenGL-ES version 1.3])
-          ac_cv_path_gles_includes="-I$i"
+          ac_cv_path_gles2_includes="-I$i"
           dnl Only the Mali library has this header file.
           if test -f $i/EGL/egl_native_types.h; then
             config_flavor=mali
@@ -129,28 +133,30 @@ AC_DEFUN([GNASH_PATH_GLES],
           fi
         fi
       fi
-      if test x"${ac_cv_path_gles_includes}" != x; then
-        break;
-      fi
     done
   fi
-  if test x"${ac_cv_path_gles_includes}" != x; then
-    AC_MSG_RESULT(${ac_cv_path_gles_includes})
-  fi
 
-  if test x"${ac_cv_path_gles_includes}" = x; then
-    AC_CHECK_HEADERS([GLES2/gl2.h], [ac_cv_path_gles_includes=""])
+  if test x"${ac_cv_path_gles1_includes}" = x; then
+    AC_CHECK_HEADERS([GLES/egl.h], [ac_cv_path_gles1_includes=""])
   fi
-  if test x"${ac_cv_path_gles_includes}" = x; then
-    AC_CHECK_HEADERS([GLES/egl.h], [ac_cv_path_gles_includes=""])
+  if test x"${ac_cv_path_gles2_includes}" = x; then
+    AC_CHECK_HEADERS([GLES2/gl2.h], [ac_cv_path_gles2_includes=""])
   fi
 
-  if test x"${ac_cv_path_gles_includes}" != x; then
-    GLES_CFLAGS="${ac_cv_path_gles_includes}"
+  if test x"${ac_cv_path_gles1_includes}" != x -a 
x"${ac_cv_path_gles1_includes}" != x/usr/include; then
+    GLES1_CFLAGS="${ac_cv_path_gles1_includes}"
   else
-    GLES_CFLAGS=""
+    GLES1_CFLAGS=""
   fi
 
+  if test x"${ac_cv_path_gles2_includes}" != x -a 
x"${ac_cv_path_gles2_includes}" != x/usr/include; then
+    GLES2_CFLAGS="${ac_cv_path_gles2_includes}"
+  else
+    GLES2_CFLAGS=""
+  fi
+
+  AC_MSG_RESULT(${ac_cv_path_gles1_includes} ${ac_cv_path_gles2_includes})
+
   if test x"${default_flavor}" = xany; then
     flavor="${config_flavor}"
   else
@@ -167,67 +173,99 @@ AC_DEFUN([GNASH_PATH_GLES],
   dnl multiple OpenGL-ES implementations installed (for testing and
   dnl development), so we don't mix and match headers and libaries
   dnl between implementations.
-  if test x"${default_version}" = xgles1; then
+  if test x"${ac_cv_path_gles1_includes}" != x; then
     AC_MSG_NOTICE([OpenGL-ES implementation being used is: ${flavor} 1.x])
     case "${flavor}" in
-      mali)    gleslist="egl glesv1"  ;;
-      10c)     gleslist="GLES_CL" ;;
-      android) gleslist="EGL GLESv1_CM" ;;
-      *)     gleslist="GLES_CL GLESv1_CM GLESv1" ;;
+      mali)    gleslist1="egl glesv1"  ;;
+      10c)     gleslist1="GLES_CL" ;;
+      android) gleslist1="EGL GLESv1_CM" ;;
+      mesa)    gleslist1="GLESv1" ;;
+      *)       gleslist1="GLES_CL GLESv1_CM GLESv1" ;;
     esac
   fi
 
-  if test x"${default_version}" = xgles2; then
+  if test x"${ac_cv_path_gles2_includes}" != x; then
     AC_MSG_NOTICE([OpenGL-ES implementation being used is: ${flavor} 2.x])
-    gleslist="EGL GLESv2"
+    gleslist2="EGL GLESv2"
+  else
+    gleslist2=""
   fi
 
   dnl Look for the libraries.
-  AC_ARG_WITH(gles_lib, AC_HELP_STRING([--with-gles-lib], [directory where 
OpenGL-ES libraries are]), with_gles_lib=${withval})
-  AC_CACHE_VAL(ac_cv_path_gles_lib,[
-    if test x"${with_gles_lib}" != x ; then
-      for j in $gleslist; do
-        if test -f ${with_gles_lib}/$i.a -o -f 
${with_gles_lib}/$i.${shlibext}; then
-          ac_cv_path_gles_lib="-L`(cd ${with_gles_lib}; pwd)` -l$i"
+  AC_ARG_WITH(gles1_lib, AC_HELP_STRING([--with-gles1-lib], [directory where 
OpenGLES 1 libraries are]), with_gles1_lib=${withval})
+  AC_CACHE_VAL(ac_cv_path_gles1_lib,[
+    if test x"${with_gles1_lib}" != x ; then
+      for j in $gleslist1; do
+        if test -f ${with_gles1_lib}/$i.a -o -f 
${with_gles1_lib}/$i.${shlibext}; then
+          ac_cv_path_gles1_lib="-L`(cd ${with_gles1_lib}; pwd)` -l$i"
+          break;
+        fi
+      done
+    fi
+  ])
+  AC_ARG_WITH(gles2_lib, AC_HELP_STRING([--with-gles2-lib], [directory where 
OpenGLES 2 libraries are]), with_gles2_lib=${withval})
+  AC_CACHE_VAL(ac_cv_path_gles2_lib,[
+    if test x"${with_gles2_lib}" != x ; then
+      for j in $gleslist2; do
+        if test -f ${with_gles2_lib}/$i.a -o -f 
${with_gles2_lib}/$i.${shlibext}; then
+          ac_cv_path_gles2_lib="-L`(cd ${with_gles2_lib}; pwd)` -l$i"
           break;
         fi
       done
     fi
   ])
 
+  has_gles1=no
+  has_gles2=no
+
   dnl add the default path to the Android NDK
   newlist="${android_ndk}/usr/lib ${libslist}"
-  if test x"${ac_cv_path_gles_lib}" = x; then
+  if test x"${ac_cv_path_gles1_lib}" = x; then
     for dir in ${newlist}; do
-      for lib in ${gleslist}; do
+      for lib in ${gleslist1}; do
         if test -f ${dir}/lib${lib}.${shlibext} -o -f ${dir}/lib${lib}.a; then
-          has_gles="yes"
+          has_gles1="yes"
           if test ! x"${dir}" = x"/usr/lib" -a ! x"${dir}" = x"/usr/lib64"; 
then
-            ac_cv_path_gles_lib="-L${dir} -l${lib}"
+            ac_cv_path_gles1_lib="-L${dir} -l${lib}"
           else
-            ac_cv_path_gles_lib="-l${lib}"
+            ac_cv_path_gles1_lib="-l${lib}"
           fi
-          dnl add the additiontal library need to link
-          if test x"${default_version}" = xgles2; then
-            ac_cv_path_gles_lib="${ac_cv_path_gles_lib} -lGLESv2"
+        fi
+      done
+    done
+  fi
+  if test x"${ac_cv_path_gles2_lib}" = x; then
+    for dir in ${newlist}; do
+      for lib in ${gleslist2}; do
+        if test -f ${dir}/lib${lib}.${shlibext} -o -f ${dir}/lib${lib}.a; then
+          has_gles2="yes"
+          if test ! x"${dir}" = x"/usr/lib" -a ! x"${dir}" = x"/usr/lib64"; 
then
+            ac_cv_path_gles2_lib="-L${dir} -l${lib}"
+          else
+            ac_cv_path_gles2_lib="-l${lib}"
           fi
-          break
         fi
       done
-      if test x"${ac_cv_path_gles_lib}" != x ; then
-          break
-      fi
     done
   fi
 
-  if test x"${ac_cv_path_gles_lib}" != x ; then
-      GLES_LIBS="${ac_cv_path_gles_lib}"
+  if test x"${ac_cv_path_gles1_lib}" != x; then
+      GLES1_LIBS="${ac_cv_path_gles1_lib}"
   else
-      GLES_LIBS=""
+      GLES1_LIBS=""
   fi
 
-  AC_SUBST(GLES_CFLAGS)
-  AC_SUBST(GLES_LIBS)
+  if test x"${ac_cv_path_gles2_lib}" != x; then
+      GLES2_LIBS="${ac_cv_path_gles2_lib}"
+  else
+      GLES2_LIBS=""
+  fi
+
+  AC_SUBST(GLES1_CFLAGS)
+  AC_SUBST(GLES1_LIBS)
+
+  AC_SUBST(GLES2_CFLAGS)
+  AC_SUBST(GLES2_LIBS)
 ])
 
 # Local Variables:

http://git.savannah.gnu.org/cgit//commit/?id=3877e91f2cdb22c18c1fe0785ae14e0a6a80a289


commit 3877e91f2cdb22c18c1fe0785ae14e0a6a80a289
Author: Rob Savoye <address@hidden>
Date:   Tue Oct 5 11:19:52 2010 -0600

    hack on old OVG patch till it compiles, but of course won't work yet

diff --git a/librender/Renderer_gles.cpp b/librender/Renderer_gles.cpp
deleted file mode 100644
index b9f0368..0000000
--- a/librender/Renderer_gles.cpp
+++ /dev/null
@@ -1,102 +0,0 @@
-// 
-//   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 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 3 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
-
-
-#ifdef HAVE_CONFIG_H
-#include "gnashconfig.h"
-#endif
-
-// gles-1.0c for Linux
-#ifdef HAVE_GLES_GL_H
-# include <GLES/gl.h>
-#endif
-#ifdef HAVE_GLES_EGL_H
-# include <GLES/egl.h>
-#endif
-
-// Mali Developer Tools for ARM 1.x
-#ifdef HAVE_EGL_EGL_H
-# include <EGL/egl.h>
-# include <EGL/eglext.h>
-#endif
-// Mali Developer Tools for ARM 2.x and Android 2.1
-#ifdef HAVE_GLES2_GL2_H
-# include <GLES2/gl2.h>
-# include <GLES2/gl2ext.h>
-#endif
-
-#include <cstring>
-#include <cmath>
-
-#include <smart_ptr.h>
-#include "swf/ShapeRecord.h"
-#include "gnash.h"
-#include "RGBA.h"
-#include "GnashImage.h"
-#include "GnashTexture.h"
-#include "GnashNumeric.h"
-#include "log.h"
-#include "utility.h"
-#include "Range2d.h"
-#include "cxform.h"
-
-#include "Renderer_gles.h"
-
-#include <boost/utility.hpp>
-#include <boost/bind.hpp>
-
-// Defined to 1 to disable (slow) anti-aliasing with the accumulation buffer
-#define NO_ANTIALIASING 1
-
-/// \file Renderer_gles.cpp
-/// \brief The OpenGL-ES renderer and related code.
-///
-
-// TODO:
-// - Profiling!
-// - Optimize code:
-// * Use display lists
-// * Use better suited standard containers
-// * convert to double at a later stage (oglVertex)
-// * keep data for less time
-// * implement hardware accelerated gradients. Most likely this will require
-//   the use of fragment shader language.
-
-// * The "Programming Tips" in the OpenGL "red book" discusses a coordinate 
system
-// that would give "exact two-dimensional rasterization". AGG uses a similar
-// system; consider the benefits and drawbacks of switching.
-
-namespace gnash {
-
-Renderer* create_Renderer_gles(bool init)
-{
-#if 0
-  Renderer_gles* renderer = new Renderer_gles;
-  if (init) {
-    renderer->init();
-  }
-  return renderer;
-#endif
-}  
-
-} // end of gnash namespace
-
-// local Variables:
-// mode: C++
-// indent-tabs-mode: nil
-// End:
diff --git a/librender/Renderer_gles.h b/librender/Renderer_gles.h
deleted file mode 100644
index d1767f2..0000000
--- a/librender/Renderer_gles.h
+++ /dev/null
@@ -1,143 +0,0 @@
-// 
-//   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 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 3 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
-
-#ifndef GNASH_RENDER_HANDLER_GLES_H
-#define GNASH_RENDER_HANDLER_GLES_H
-
-#ifdef HAVE_CONFIG_H
-#include "gnashconfig.h"
-#endif
-
-// gles-1.0c for Linux
-#ifdef HAVE_GLES_GL_H
-# include <GLES/gl.h>
-#endif
-#ifdef HAVE_GLES_EGL_H
-#include <GLES/egl.h>
-#endif
-// Mali Developer Tools for ARM 1.x
-#ifdef HAVE_EGL_EGL_H
-# include <EGL/egl.h>
-# include <EGL/eglext.h>
-#endif
-// Mali Developer Tools for ARM 2.x and Android 2.1
-#ifdef HAVE_GLES2_GL2_H
-# include <GLES2/gl2.h>
-# include <GLES2/gl2ext.h>
-#endif
-
-#include <vector>
-
-#include "Renderer.h"
-#include "Geometry.h"
-
-#include <map>
-
-namespace gnash {
-
-typedef std::vector<const Path*> PathRefs;
-
-struct oglVertex {
-    oglVertex(GLfloat x, GLfloat y, GLfloat z = 0.0)
-        : _x(x), _y(y), _z(z)
-        {
-        }
-    
-    oglVertex(const point& p)
-        : _x(p.x), _y(p.y), _z(0.0)
-        {
-        }
-    
-    GLfloat _x;
-    GLfloat _y;
-    GLfloat _z;
-};
-
-typedef std::map<const Path*, std::vector<oglVertex> > PathPointMap;
-
-class WholeShape
-{
-public:
-    void newPath(const Path& new_path)
-    {
-        PathRefs refs;
-        refs.push_back(&new_path); 
-        shape.push_back(refs);
-    }
-  
-    void addPath(const Path& add_path)
-    {
-        PathRefs& refs = shape.back();
-        refs.push_back(&add_path);
-    }
-  
-    void addPathRefs(const PathRefs& pathrefs)
-    {
-        PathRefs new_refs(pathrefs.begin(), pathrefs.end());
-        shape.push_back(new_refs);
-    }
-  
-    const std::vector<PathRefs>& get() const
-    {
-        return shape;
-    }
-private:
-  std::vector<PathRefs> shape;
-};
-
-    class bitmap_info_ogl //: public BitmapInfo
-{
-public:
-    
-    /// Set line and fill styles for mesh & line_strip rendering.
-    enum bitmap_wrap_mode
-    {
-        WRAP_REPEAT,
-        WRAP_CLAMP
-    };
-    
-    bitmap_info_ogl(GnashImage* image, GLenum pixelformat,
-                    bool ogl_accessible);
-    ~bitmap_info_ogl();
-    
-    void apply(const gnash::SWFMatrix& bitmap_matrix,
-               bitmap_wrap_mode wrap_mode) const;
-private:
-    inline bool ogl_accessible() const;
-    void setup() const;    
-    void upload(boost::uint8_t* data, size_t width, size_t height) const;
-    
-    mutable std::auto_ptr<GnashImage> _img;
-    GLenum _pixel_format;
-    GLenum _ogl_img_type;
-    mutable bool _ogl_accessible;  
-    mutable GLuint _texture_id;
-    size_t _orig_width;
-    size_t _orig_height;
-};
-
-DSOEXPORT Renderer* create_Renderer_gles(bool init = true);
-
-} // namespace gnash
-
-#endif // __RENDER_HANDLER_GLES_H__
-
-// local Variables:
-// mode: C++
-// indent-tabs-mode: nil
-// End:
diff --git a/librender/Renderer_ovg.cpp b/librender/Renderer_ovg.cpp
index d592a35..6781ee1 100644
--- a/librender/Renderer_ovg.cpp
+++ b/librender/Renderer_ovg.cpp
@@ -35,6 +35,7 @@
 #include "smart_ptr.h"
 #include "GnashImage.h"
 #include "GnashNumeric.h"
+#include "FillStyle.h"
 #include "log.h"
 #include "utility.h"
 #include "Range2d.h"
@@ -165,8 +166,8 @@ bitmap_info_ovg::bitmap_info_ovg(GnashImage* img, 
VGImageFormat pixelformat, VGP
     if (_pixel_format == VG_sARGB_8888)
         _image = vgCreateImage(VG_sARGB_8888, _width, _height, 
GNASH_IMAGE_QUALITY);    
     
-    vgImageSubData(_image, _img->data(), _width * 4, VG_sARGB_8888,
-                   0, 0, _width, _height);
+    // vgImageSubData(_image, _img->data(), _width * 4, VG_sARGB_8888,
+    //                0, 0, _width, _height); FIXME
     
     tex_size += _width * _height * 4;
     log_debug("Add Texture size:%d (%d x %d x %dbpp)", _width * _height * 4, 
_width, _height, 4);
@@ -292,6 +293,8 @@ public:
 #endif
         }
 
+#if 0
+    FIXME
     // 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.
@@ -307,7 +310,8 @@ public:
               std::abort();
         }
     }
-
+#endif
+    
     // Since we store drawing operations in display lists, we take special care
     // to store video frame operations in their own display list, lest they be
     // anti-aliased with the rest of the drawing. Since display lists cannot be
@@ -576,11 +580,14 @@ public:
     void add_paths(const PathVec& path_vec)
     {
         cxform dummy_cx;
-    
-        fill_style coloring;
+#if 0
+      FIXME:
+        
+        FillStyle coloring
         coloring.setSolid(rgba(0,255,0,255));
             
         draw_submask(path_vec, SWFMatrix(), dummy_cx, coloring);
+#endif
     }
   
     void disable_mask()
@@ -737,10 +744,12 @@ public:
     
         }    
     }
-
-    void apply_fill_style(const fill_style& style, const SWFMatrix& /* mat */,
+    
+    void apply_fill_style(const FillStyle& style, const SWFMatrix& /* mat */,
                           const cxform& cx)
     {
+#if 0
+        FIXME fill_style changed to FillStyle
         int fill_type = style.get_type();
       
         switch (fill_type) {
@@ -793,6 +802,7 @@ public:
           }
         
         } // switch
+#endif
     }
   
     bool apply_line_style(const LineStyle& style, const cxform& cx, const 
SWFMatrix& mat)
@@ -1017,7 +1027,7 @@ public:
     void draw_subshape(const PathVec& path_vec,
                       const SWFMatrix& mat,
                       const cxform& cx,
-                      const std::vector<fill_style>& fill_styles,
+                      const std::vector<FillStyle>& fill_styles,
                       const std::vector<LineStyle>& line_styles)
     {
         PathVec normalized = normalize_paths(path_vec);
@@ -1066,7 +1076,7 @@ public:
     void draw_submask(const PathVec& path_vec,
                       const SWFMatrix& /* mat */,
                       const cxform& /* cx */,
-                      const fill_style& /* f_style */)
+                      const FillStyle& /* f_style */)
     {
 
         PathVec normalized = normalize_paths(path_vec);
@@ -1144,7 +1154,7 @@ public:
 
         std::vector<PathVec::const_iterator> subshapes = 
find_subshapes(path_vec);
     
-        const std::vector<fill_style>& fill_styles = shape.fillStyles();
+        const std::vector<FillStyle>& fill_styles = shape.fillStyles();
         const std::vector<LineStyle>& line_styles = shape.lineStyles();
     
         for (size_t i = 0; i < subshapes.size()-1; ++i) {
@@ -1171,13 +1181,15 @@ public:
         }
     
         cxform dummy_cx;
-        std::vector<fill_style> glyph_fs;
-    
-        fill_style coloring;
+        std::vector<FillStyle> glyph_fs;
+
+#if 0
+        FIXME fill_style is now FillStyle
+        FillStyle coloring;
         coloring.setSolid(c);
     
         glyph_fs.push_back(coloring);
-    
+#endif
         std::vector<LineStyle> dummy_ls;
     
         eglScopeMatrix scope_mat(mat);
diff --git a/librender/Renderer_ovg.h b/librender/Renderer_ovg.h
index e5ccd54..aca1970 100644
--- a/librender/Renderer_ovg.h
+++ b/librender/Renderer_ovg.h
@@ -28,7 +28,7 @@
 #include <VG/vgext.h>
 
 #include "Geometry.h"
-#include "BitmapInfo.h"
+//#include "BitmapInfo.h"
 #include "Renderer.h"
 
 namespace gnash {
diff --git a/librender/Renderer_ovg_bitmap.h b/librender/Renderer_ovg_bitmap.h
index 0a401a5..36462fc 100644
--- a/librender/Renderer_ovg_bitmap.h
+++ b/librender/Renderer_ovg_bitmap.h
@@ -23,7 +23,7 @@
 #define GNASH_RENDER_HANDLER_OVG_BITMAP_H
 
 #include "Geometry.h"
-#include "BitmapInfo.h"
+//#include "BitmapInfo.h"
 #include "Renderer.h"
 
 namespace gnash {
@@ -32,7 +32,7 @@ namespace gnash {
 /// be removed but an older implementation required this method and it may be
 /// necessary again when the last missing parts of the renderer will be
 /// implemented. And when might that be? I don't think I'll wait.
-class bitmap_info_ovg : public BitmapInfo
+class bitmap_info_ovg // : public BitmapInfo
 {
 public:
   

http://git.savannah.gnu.org/cgit//commit/?id=dc81ff0f78d92f94f8a4c92436388565f5838ffc


commit dc81ff0f78d92f94f8a4c92436388565f5838ffc
Author: Rob Savoye <address@hidden>
Date:   Tue Oct 5 11:18:57 2010 -0600

    fix type, use ovg instead of ogv

diff --git a/configure.ac b/configure.ac
index 4eeb05a..651b87e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -964,7 +964,7 @@ AC_ARG_ENABLE(renderer,
         ;;
       ovg|OVG|OpenVG|openvg)
         renderer_list="${renderer_list} OpenVG"
-        build_ogv=yes
+        build_ovg=yes
         nrender=$((nrender+1))
         ;;
       agg|AGG)
@@ -977,7 +977,7 @@ AC_ARG_ENABLE(renderer,
         build_cairo=yes
         nrender=$((nrender+1))
         ;;
-      *) AC_MSG_ERROR([invalid renderer specified: ${enableval} given (accept: 
 (ogl|cairo|agg|all)])
+      *) AC_MSG_ERROR([invalid renderer specified: ${enableval} given (accept: 
 (ogl|ovg|cairo|agg|all)])
         ;;
       esac]
     enableval=`echo ${enableval} | cut -d ' ' -f 2-6`
@@ -2396,7 +2396,7 @@ if test x"${build_gles}" = xyes; then
   GNASH_PATH_GLES
 fi
 
-if test x"${build_ogv}" = xyes; then
+if test x"${build_ovg}" = xyes; then
   GNASH_PKG_FIND(EGL, [EGL/egl.h], [EGL library], eglGetDisplay)
   GNASH_PKG_FIND(OpenVG, [vg/openvg.h], [OpenVG library], vgDrawImage)
 fi

http://git.savannah.gnu.org/cgit//commit/?id=dbac5e22c0db908bf1d9d7049664c9bcdc9c1b6a


commit dbac5e22c0db908bf1d9d7049664c9bcdc9c1b6a
Author: Rob Savoye <address@hidden>
Date:   Tue Oct 5 11:18:18 2010 -0600

    rename Renderer_gles.cpp to Renderer_gles1.cpp

diff --git a/librender/Makefile.am b/librender/Makefile.am
index 74024b2..6eb25e1 100644
--- a/librender/Makefile.am
+++ b/librender/Makefile.am
@@ -86,7 +86,7 @@ libgnashrender_la_LIBADD += $(AGG_LIBS) $(LIBVA)
 endif
 
 if  BUILD_GLES_RENDERER
-libgnashrender_la_SOURCES += Renderer_gles.cpp 
+libgnashrender_la_SOURCES += Renderer_gles1.cpp 
 libgnashrender_la_LIBADD += $(AGG_LIBS) $(LIBVA)
 endif
 

http://git.savannah.gnu.org/cgit//commit/?id=d3e84d1e13a06372fdd0cd841d2213e316a704ea


commit d3e84d1e13a06372fdd0cd841d2213e316a704ea
Author: Rob Savoye <address@hidden>
Date:   Tue Oct 5 11:17:50 2010 -0600

    rename and make OpenGLES1.1 specific.

diff --git a/librender/Renderer_gles1.cpp b/librender/Renderer_gles1.cpp
new file mode 100644
index 0000000..fa9fc94
--- /dev/null
+++ b/librender/Renderer_gles1.cpp
@@ -0,0 +1,104 @@
+// 
+//   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 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 3 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
+
+
+#ifdef HAVE_CONFIG_H
+#include "gnashconfig.h"
+#endif
+
+// gles-1.0c for Linux
+#ifdef HAVE_GLES_GL_H
+# include <GLES/gl.h>
+#endif
+#ifdef HAVE_GLES_EGL_H
+# include <GLES/egl.h>
+#endif
+
+#if 0
+// Mali Developer Tools for ARM 1.x
+#ifdef HAVE_EGL_EGL_H
+# include <EGL/egl.h>
+# include <EGL/eglext.h>
+#endif
+// Mali Developer Tools for ARM 2.x and Android 2.1
+#ifdef HAVE_GLES2_GL2_H
+# include <GLES2/gl2.h>
+# include <GLES2/gl2ext.h>
+#endif
+#endif
+
+#include <cstring>
+#include <cmath>
+
+#include <smart_ptr.h>
+#include "swf/ShapeRecord.h"
+#include "gnash.h"
+#include "RGBA.h"
+#include "GnashImage.h"
+#include "GnashTexture.h"
+#include "GnashNumeric.h"
+#include "log.h"
+#include "utility.h"
+#include "Range2d.h"
+#include "cxform.h"
+
+#include "Renderer_gles1.h"
+
+#include <boost/utility.hpp>
+#include <boost/bind.hpp>
+
+// Defined to 1 to disable (slow) anti-aliasing with the accumulation buffer
+#define NO_ANTIALIASING 1
+
+/// \file Renderer_gles.cpp
+/// \brief The OpenGL-ES renderer and related code.
+///
+
+// TODO:
+// - Profiling!
+// - Optimize code:
+// * Use display lists
+// * Use better suited standard containers
+// * convert to double at a later stage (oglVertex)
+// * keep data for less time
+// * implement hardware accelerated gradients. Most likely this will require
+//   the use of fragment shader language.
+
+// * The "Programming Tips" in the OpenGL "red book" discusses a coordinate 
system
+// that would give "exact two-dimensional rasterization". AGG uses a similar
+// system; consider the benefits and drawbacks of switching.
+
+namespace gnash {
+
+Renderer* create_Renderer_gles(bool init)
+{
+#if 0
+  Renderer_gles* renderer = new Renderer_gles;
+  if (init) {
+    renderer->init();
+  }
+  return renderer;
+#endif
+}  
+
+} // end of gnash namespace
+
+// local Variables:
+// mode: C++
+// indent-tabs-mode: nil
+// End:
diff --git a/librender/Renderer_gles1.h b/librender/Renderer_gles1.h
new file mode 100644
index 0000000..74f2854
--- /dev/null
+++ b/librender/Renderer_gles1.h
@@ -0,0 +1,146 @@
+// 
+//   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 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 3 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
+
+#ifndef GNASH_RENDER_HANDLER_GLES_H
+#define GNASH_RENDER_HANDLER_GLES_H
+
+#ifdef HAVE_CONFIG_H
+#include "gnashconfig.h"
+#endif
+
+// gles-1.0c for Linux
+#ifdef HAVE_GLES_GL_H
+# include <GLES/gl.h>
+#endif
+#ifdef HAVE_GLES_EGL_H
+#include <GLES/egl.h>
+#endif
+
+#if 0
+// Mali Developer Tools for ARM 1.x
+#ifdef HAVE_EGL_EGL_H
+# include <EGL/egl.h>
+# include <EGL/eglext.h>
+#endif
+// Mali Developer Tools for ARM 2.x and Android 2.1
+#ifdef HAVE_GLES2_GL2_H
+# include <GLES2/gl2.h>
+# include <GLES2/gl2ext.h>
+#endif
+#endif
+
+#include <vector>
+
+#include "Renderer.h"
+#include "Geometry.h"
+
+#include <map>
+
+namespace gnash {
+
+typedef std::vector<const Path*> PathRefs;
+
+struct oglVertex {
+    oglVertex(GLfloat x, GLfloat y, GLfloat z = 0.0)
+        : _x(x), _y(y), _z(z)
+        {
+        }
+    
+    oglVertex(const point& p)
+        : _x(p.x), _y(p.y), _z(0.0)
+        {
+        }
+    
+    GLfloat _x;
+    GLfloat _y;
+    GLfloat _z;
+};
+
+typedef std::map<const Path*, std::vector<oglVertex> > PathPointMap;
+
+class WholeShape
+{
+public:
+    void newPath(const Path& new_path)
+    {
+        PathRefs refs;
+        refs.push_back(&new_path); 
+        shape.push_back(refs);
+    }
+  
+    void addPath(const Path& add_path)
+    {
+        PathRefs& refs = shape.back();
+        refs.push_back(&add_path);
+    }
+  
+    void addPathRefs(const PathRefs& pathrefs)
+    {
+        PathRefs new_refs(pathrefs.begin(), pathrefs.end());
+        shape.push_back(new_refs);
+    }
+  
+    const std::vector<PathRefs>& get() const
+    {
+        return shape;
+    }
+private:
+  std::vector<PathRefs> shape;
+};
+
+    class bitmap_info_ogl //: public BitmapInfo
+{
+public:
+    
+    /// Set line and fill styles for mesh & line_strip rendering.
+    enum bitmap_wrap_mode
+    {
+        WRAP_REPEAT,
+        WRAP_CLAMP
+    };
+    
+    bitmap_info_ogl(GnashImage* image, GLenum pixelformat,
+                    bool ogl_accessible);
+    ~bitmap_info_ogl();
+    
+    void apply(const gnash::SWFMatrix& bitmap_matrix,
+               bitmap_wrap_mode wrap_mode) const;
+private:
+    inline bool ogl_accessible() const;
+    void setup() const;    
+    void upload(boost::uint8_t* data, size_t width, size_t height) const;
+    
+    mutable std::auto_ptr<GnashImage> _img;
+    GLenum _pixel_format;
+    GLenum _ogl_img_type;
+    mutable bool _ogl_accessible;  
+    mutable GLuint _texture_id;
+    size_t _orig_width;
+    size_t _orig_height;
+};
+
+DSOEXPORT Renderer* create_Renderer_gles(bool init = true);
+
+} // namespace gnash
+
+#endif // __RENDER_HANDLER_GLES_H__
+
+// local Variables:
+// mode: C++
+// indent-tabs-mode: nil
+// End:

-----------------------------------------------------------------------

Summary of changes:
 Makefile.am                                        |   12 ++
 configure.ac                                       |   68 +++++---
 gui/fb/fb.am                                       |    2 +-
 gui/fb/fb_glue_gles.cpp                            |    7 +-
 gui/fb/fb_glue_gles.h                              |    6 +-
 librender/Makefile.am                              |    9 +-
 .../{Renderer_gles.cpp => Renderer_gles1.cpp}      |    8 +-
 librender/{Renderer_gles.h => Renderer_gles1.h}    |   13 +-
 .../{Renderer_gles.cpp => Renderer_gles2.cpp}      |   22 +--
 .../fileio/fileio.h => librender/Renderer_gles2.h  |   43 +++--
 librender/Renderer_ovg.cpp                         |   40 +++--
 librender/Renderer_ovg.h                           |    2 +-
 librender/Renderer_ovg_bitmap.h                    |    4 +-
 librender/render_handler_gles.h                    |    6 +-
 macros/gles.m4                                     |  196 ++++++++++++--------
 15 files changed, 273 insertions(+), 165 deletions(-)
 copy librender/{Renderer_gles.cpp => Renderer_gles1.cpp} (96%)
 rename librender/{Renderer_gles.h => Renderer_gles1.h} (94%)
 rename librender/{Renderer_gles.cpp => Renderer_gles2.cpp} (87%)
 copy extensions/fileio/fileio.h => librender/Renderer_gles2.h (60%)


hooks/post-receive
-- 
Gnash



reply via email to

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