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. 4577afa216f49320f936


From: Rob Savoye
Subject: [Gnash-commit] [SCM] Gnash branch, openvg, updated. 4577afa216f49320f9360b1c704a056b36ba35c0
Date: Mon, 20 Sep 2010 16:34:26 +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  4577afa216f49320f9360b1c704a056b36ba35c0 (commit)
       via  5665cdb258a1191bad3a050392178fc8901a8480 (commit)
      from  25d315301e008059e614f299bdd16bbb40d7ab73 (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=4577afa216f49320f9360b1c704a056b36ba35c0


commit 4577afa216f49320f9360b1c704a056b36ba35c0
Author: Rob Savoye <address@hidden>
Date:   Wed Sep 15 22:39:00 2010 +0200

    hack so all the new files actually compile, but probably don't work yet.

diff --git a/gui/fb/fb.am b/gui/fb/fb.am
index 84216e2..019e097 100644
--- a/gui/fb/fb.am
+++ b/gui/fb/fb.am
@@ -49,8 +49,8 @@ endif # BUILD_OVG_RENDERER
 # This supports only OpenGL-ES 1.1 with EGL support.
 if BUILD_GLES_RENDERER
 fb_gnash_SOURCES += fb/fb_glue_gles.cpp fb/fb_glue_gles.h
-fb_gnash_CPPFLAGS += $(GLES_CFLAGS)
-fb_gnash_LDADD += $(GLES__LIBS)
+fb_gnash_CPPFLAGS += $(GLES_CFLAGS) $(EGL_CFLAGS)
+fb_gnash_LDADD += $(GLES_LIBS) $(EGL_LIBS)
 endif  # BUILD_OVG_RENDERER
 
 endif  # BUILD_FB_GUI
diff --git a/gui/fb/fb_glue_gles.cpp b/gui/fb/fb_glue_gles.cpp
index ea884e4..ce7dd5c 100644
--- a/gui/fb/fb_glue_gles.cpp
+++ b/gui/fb/fb_glue_gles.cpp
@@ -39,7 +39,7 @@
 #endif
 
 #include "log.h"
-#include "fb_gles_glue.h"
+#include "fb_glue_gles.h"
 
 namespace gnash
 {
@@ -111,8 +111,8 @@ FBglesGlue::init(int /*argc*/, char *** /*argv*/) {
     log_trace("EGL: pbuffer config ok");
     
     const EGLint pbuffer_attrib_list[] = {
-        EGL_WIDTH, PBUFFER_WIDTH,
-        EGL_HEIGHT, PBUFFER_HEIGHT,
+        EGL_WIDTH, EGL_MAX_PBUFFER_WIDTH,
+        EGL_HEIGHT, EGL_MAX_PBUFFER_HEIGHT,
         EGL_TEXTURE_FORMAT, EGL_TEXTURE_RGBA,
         EGL_TEXTURE_TARGET, EGL_TEXTURE_2D,
         EGL_MIPMAP_TEXTURE, EGL_FALSE,
diff --git a/gui/fb/fb_glue_gles.h b/gui/fb/fb_glue_gles.h
index 3962ea6..395a05a 100644
--- a/gui/fb/fb_glue_gles.h
+++ b/gui/fb/fb_glue_gles.h
@@ -41,14 +41,13 @@
 # include <GLES2/gl2ext.h>
 #endif
 
-#include "ogl_glue.h"
 #include "fbsup.h"
 #include "render_handler_gles.h"
 
 namespace gnash
 {
 
-class FBglesGlue: public FBGlue, public OglGlue
+    class FBglesGlue: public FBGlue // , public OglGlue
 {
 public:
     FBglesGlue() :
@@ -58,9 +57,11 @@ public:
     
     virtual bool init(int /*argc*/, char *** /*argv*/);
     
-    virtual render_handler* createRenderHandler() {
+    virtual Renderer* createRenderHandler() {
         //_render_handler = create_render_handler_ogl (true, this);
-        return _render_handler;
+        //        return _render_handler; FIXME: 
+        // error: invalid covariant return type for 'virtual 
gnash::render_handler* gnash::FBglesGlue::createRenderHandler()'
+
     }
     
     virtual void setInvalidatedRegions(const InvalidatedRanges& /* ranges */) 
{}
diff --git a/librender/Makefile.am b/librender/Makefile.am
index 1c6ecd4..74024b2 100644
--- a/librender/Makefile.am
+++ b/librender/Makefile.am
@@ -85,6 +85,11 @@ libgnashrender_la_SOURCES += Renderer_ovg.cpp
 libgnashrender_la_LIBADD += $(AGG_LIBS) $(LIBVA)
 endif
 
+if  BUILD_GLES_RENDERER
+libgnashrender_la_SOURCES += Renderer_gles.cpp 
+libgnashrender_la_LIBADD += $(AGG_LIBS) $(LIBVA)
+endif
+
 if  BUILD_CAIRO_RENDERER
 libgnashrender_la_SOURCES += Renderer_cairo.cpp
 libgnashrender_la_LIBADD += $(CAIRO_LIBS)

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


commit 5665cdb258a1191bad3a050392178fc8901a8480
Author: Rob Savoye <address@hidden>
Date:   Wed Sep 15 22:38:03 2010 +0200

    migrate more missing files from old bzr branch.

diff --git a/librender/Renderer_gles.cpp b/librender/Renderer_gles.cpp
new file mode 100644
index 0000000..b9f0368
--- /dev/null
+++ b/librender/Renderer_gles.cpp
@@ -0,0 +1,102 @@
+// 
+//   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
new file mode 100644
index 0000000..d1767f2
--- /dev/null
+++ b/librender/Renderer_gles.h
@@ -0,0 +1,143 @@
+// 
+//   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/render_handler_gles.h b/librender/render_handler_gles.h
new file mode 100644
index 0000000..359a5a0
--- /dev/null
+++ b/librender/render_handler_gles.h
@@ -0,0 +1,70 @@
+// 
+//   Copyright (C) 2005, 2006, 2007, 2008, 2009 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
+//
+// port to OpenGL-Embedded Subset 1.1:
+// Copyright (C) 2010 Sennheiser GmbH & Co. KG, Wedemark, Germany
+// author: Bernd Kischnick <address@hidden>
+//
+
+#ifndef GNASH_RENDER_HANDLER_OGLES_H
+#define GNASH_RENDER_HANDLER_OGLES_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_GLES_EGL_H
+# include <GLES/egl.h>
+# include <GLES/eglext.h>
+#endif
+// Mali Developer Tools for ARM 1.x
+#ifdef HAVE_GLES2_GL2_H
+# include <GLES2/gl2.h>
+# include <GLES2/gl2ext.h>
+#endif
+
+// #include <glues.h>
+
+namespace gnash {
+
+typedef GLfloat oglCoord;
+#define OGL_COORD GL_FLOAT
+#define GL_LINE_WIDTH_RANGE GL_ALIASED_LINE_WIDTH_RANGE
+#define glOrtho glOrthof
+#define GLUCALLBACKTYPE GLvoid (*)()
+
+class OglGlue;
+class render_handler;
+
+render_handler* create_render_handler_ogl (bool init, OglGlue* glue);
+
+} // namespace gnash
+
+#endif // __RENDER_HANDLER_OGLES_H__
+
+// Local Variables:
+// mode: C++
+// indent-tabs-mode: nil
+// End:

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

Summary of changes:
 gui/fb/fb.am                    |    4 +-
 gui/fb/fb_glue_gles.cpp         |    6 +-
 gui/fb/fb_glue_gles.h           |    9 ++-
 librender/Makefile.am           |    5 ++
 librender/Renderer_gles.cpp     |  102 ++++++++++++++++++++++++++++
 librender/Renderer_gles.h       |  143 +++++++++++++++++++++++++++++++++++++++
 librender/render_handler_gles.h |   70 +++++++++++++++++++
 7 files changed, 330 insertions(+), 9 deletions(-)
 create mode 100644 librender/Renderer_gles.cpp
 create mode 100644 librender/Renderer_gles.h
 create mode 100644 librender/render_handler_gles.h


hooks/post-receive
-- 
Gnash



reply via email to

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