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. 4db4a57c76bdf00ffa4e


From: Rob Savoye
Subject: [Gnash-commit] [SCM] Gnash branch, openvg, updated. 4db4a57c76bdf00ffa4ee97f9b1068995fd765e1
Date: Tue, 28 Dec 2010 02:40:54 +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  4db4a57c76bdf00ffa4ee97f9b1068995fd765e1 (commit)
       via  cc1161e7c576c7cb08131b2fa279e634c41b750b (commit)
       via  789ae9c1aeb95df01c904957f8a1aea739f912b8 (commit)
       via  ede29ff2c92c8c8cfbdc333548e975c61f77840e (commit)
       via  cf6c2decbafd64c63a9785516dbc790c7f995b92 (commit)
      from  5fc3dc5f8d2b0d9d85ecb8e76a72abd4682cb239 (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=4db4a57c76bdf00ffa4ee97f9b1068995fd765e1


commit 4db4a57c76bdf00ffa4ee97f9b1068995fd765e1
Author: Rob Savoye <address@hidden>
Date:   Mon Dec 27 19:40:26 2010 -0700

    swapPbuffers() was renamed to swapBuffers()

diff --git a/gui/gtk/gtk_glue_ovg.cpp b/gui/gtk/gtk_glue_ovg.cpp
index 151bafa..e2de310 100644
--- a/gui/gtk/gtk_glue_ovg.cpp
+++ b/gui/gtk/gtk_glue_ovg.cpp
@@ -231,7 +231,7 @@ GtkOvgGlue::setRenderHandlerSize(int width, int height)
 
 
     renderer::EGLDevice *egl = (renderer::EGLDevice*)_device.get();
-    egl->swapPbuffers();
+    egl->swapBuffers();
     
     sleep(5);
 }

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


commit cc1161e7c576c7cb08131b2fa279e634c41b750b
Author: Rob Savoye <address@hidden>
Date:   Mon Dec 27 19:39:41 2010 -0700

    add new files

diff --git a/librender/Makefile.am b/librender/Makefile.am
index f0ac925..a6394bd 100644
--- a/librender/Makefile.am
+++ b/librender/Makefile.am
@@ -111,7 +111,9 @@ libgnashrender_la_CPPFLAGS += $(OPENVG_CFLAGS)
 libgnashrender_la_SOURCES += \
        openvg/Renderer_ovg.cpp \
        openvg/Renderer_ovg.h \
-       openvg/Renderer_ovg_bitmap.h
+       openvg/OpenVGBitmap.h \
+       openvg/OpenVGBitmap.cpp \
+       openvg/OpenVGStyle.h
 libgnashrender_la_LIBADD += $(OPENVG_LIBS)
 endif
 

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


commit 789ae9c1aeb95df01c904957f8a1aea739f912b8
Author: Rob Savoye <address@hidden>
Date:   Mon Dec 27 19:39:19 2010 -0700

    move code to header to be easier to debug and more compact

diff --git a/librender/openvg/Renderer_ovg.cpp 
b/librender/openvg/Renderer_ovg.cpp
index 87bf2dd..ded38ae 100644
--- a/librender/openvg/Renderer_ovg.cpp
+++ b/librender/openvg/Renderer_ovg.cpp
@@ -168,80 +168,6 @@ preparepath(VGPath path, const std::vector<Edge>& edges,
         vgAppendPathData (path, scount, gseg, gdata);
 }
 
-#if 0
-// Use the image class copy constructor; it's not important any more
-// what kind of image it is.
-OpenVGBitmap::OpenVGBitmap(std::auto_ptr<gnash::image::GnashImage> img,
-                                 VGImageFormat pixelformat, VGPaint vgpaint)
-    : _image(img.release()),
-      _pixel_format(pixelformat),
-      _vgpaint(vgpaint)
-{
-    GNASH_REPORT_FUNCTION;
-
-    size_t width = _image->width();
-    size_t height = _image->height();
-  
-    _vgimage = vgCreateImage(VG_sRGB_565, width, height, GNASH_IMAGE_QUALITY); 
   
-    
-    vgImageSubData(_vgimage, _image->begin(), width * 4, VG_sRGB_565,
-                   0, 0, width, height);
-
-    tex_size += width * height * 4;
-    log_debug("Add Texture size:%d (%d x %d x %dbpp)", width * height * 4, 
-              width, height, 4);
-    log_debug("Current Texture size: %d", tex_size);
-}   
-
-OpenVGBitmap::~OpenVGBitmap()
-{
-    GNASH_REPORT_FUNCTION;
-
-    tex_size -= _image->width() * _image->height() * 4;
-    log_debug(_("Remove Texture size:%d (%d x %d x %dbpp)"),
-              _image->width() * _image->height() * 4,
-              _image->width(), _image->height(), 4);
-    log_debug(_("Current Texture size: %d"), tex_size);
-
-    vgDestroyImage(_vgimage);
-}
-
-void
-OpenVGBitmap::apply(const gnash::SWFMatrix& bitmap_matrix,
-                       bitmap_wrap_mode wrap_mode) const
-{
-    GNASH_REPORT_FUNCTION;
-    gnash::SWFMatrix mat;
-    VGfloat     vmat[9];
-    
-    mat = bitmap_matrix;
-
-    vgSetParameteri (_vgpaint, VG_PAINT_TYPE, VG_PAINT_TYPE_PATTERN);
-    vgPaintPattern (_vgpaint, _vgimage);
-    
-    mat.invert();
-    memset(vmat, 0, sizeof(vmat));
-    vmat[0] = mat.sx  / 65536.0f;
-    vmat[1] = mat.shx / 65536.0f;
-    vmat[3] = mat.shy / 65536.0f;
-    vmat[4] = mat.sy  / 65536.0f;
-    vmat[6] = mat.tx;
-    vmat[7] = mat.ty;
-    
-    vgSeti (VG_MATRIX_MODE, VG_MATRIX_FILL_PAINT_TO_USER);
-    vgLoadMatrix (vmat);
-    vgSeti (VG_MATRIX_MODE, VG_MATRIX_STROKE_PAINT_TO_USER);
-    vgLoadMatrix (vmat);
-    vgSeti (VG_MATRIX_MODE, VG_MATRIX_PATH_USER_TO_SURFACE);
-
-    if (wrap_mode == WRAP_CLAMP) {  
-        vgSetParameteri (_vgpaint, VG_PAINT_PATTERN_TILING_MODE, VG_TILE_PAD);
-    } else {
-        vgSetParameteri (_vgpaint, VG_PAINT_PATTERN_TILING_MODE, 
VG_TILE_REPEAT);
-    }
-}
-#endif
-
 template<typename C, typename T, typename R, typename A>
 void 
 for_each(C& container, R (T::*pmf)(const A&),const A& arg)

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


commit ede29ff2c92c8c8cfbdc333548e975c61f77840e
Author: Rob Savoye <address@hidden>
Date:   Mon Dec 27 19:38:40 2010 -0700

    move code from header to be easier to debug and more compact

diff --git a/librender/openvg/OpenVGBitmap.h b/librender/openvg/OpenVGBitmap.h
index 900d176..2cbced2 100644
--- a/librender/openvg/OpenVGBitmap.h
+++ b/librender/openvg/OpenVGBitmap.h
@@ -30,98 +30,27 @@ namespace renderer {
 
 namespace openvg {
 
+/// This class is the OpenVG specific representation of a Gnash
+/// Cached Bitmap.
 class OpenVGBitmap : public CachedBitmap
 {
 public:
     /// Set line and fill styles for mesh & line_strip rendering.
     enum bitmap_wrap_mode { WRAP_REPEAT, WRAP_CLAMP };
     
-    OpenVGBitmap(std::auto_ptr<image::GnashImage> im)
-        : _image(im.release())
-    {
-        GNASH_REPORT_FUNCTION;
-    }
+    OpenVGBitmap(std::auto_ptr<image::GnashImage> im);
   
     OpenVGBitmap(std::auto_ptr<image::GnashImage> im,
-                    VGImageFormat pixelformat, VGPaint vgpaint)
-        : _image(im.release()),
-          _pixel_format(pixelformat),
-          _vgpaint(vgpaint)
-    {
-        GNASH_REPORT_FUNCTION;
-        
-        size_t width = _image->width();
-        size_t height = _image->height();
-        
-        _vgimage = vgCreateImage(VG_sRGB_565, width, height,
-                                 VG_IMAGE_QUALITY_FASTER);    
-        
-        vgImageSubData(_vgimage, _image->begin(), width * 4, VG_sRGB_565,
-                       0, 0, width, height);
-        
-        _tex_size += width * height * 4;
-        log_debug("Add Texture size:%d (%d x %d x %dbpp)", width * height * 4, 
-                  width, height, 4);
-        log_debug("Current Texture size: %d", _tex_size);
-    } 
-
-    ~OpenVGBitmap()
-    {
-        GNASH_REPORT_FUNCTION;
-        
-        _tex_size -= _image->width() * _image->height() * 4;
-        log_debug(_("Remove Texture size:%d (%d x %d x %dbpp)"),
-                  _image->width() * _image->height() * 4,
-                  _image->width(), _image->height(), 4);
-        log_debug(_("Current Texture size: %d"), _tex_size);
-        
-        vgDestroyImage(_vgimage);
-    }
+                 VGImageFormat pixelformat, VGPaint vgpaint);
+    ~OpenVGBitmap();
 
     void dispose()  { _image.reset(); }
     bool disposed() const { return !_image.get(); }
 
-    image::GnashImage& image() {
-        GNASH_REPORT_FUNCTION;
-        if (_image) {
-            return *_image;
-        }
-    }    
-
+    image::GnashImage& image();
+    
     void apply(const gnash::SWFMatrix& bitmap_matrix,
-               bitmap_wrap_mode wrap_mode) const
-    {
-        GNASH_REPORT_FUNCTION;
-        gnash::SWFMatrix mat;
-        VGfloat     vmat[9];
-        
-        mat = bitmap_matrix;
-        
-        vgSetParameteri (_vgpaint, VG_PAINT_TYPE, VG_PAINT_TYPE_PATTERN);
-        vgPaintPattern (_vgpaint, _vgimage);
-        
-        mat.invert();
-        memset(vmat, 0, sizeof(vmat));
-        vmat[0] = mat.sx  / 65536.0f;
-        vmat[1] = mat.shx / 65536.0f;
-        vmat[3] = mat.shy / 65536.0f;
-        vmat[4] = mat.sy  / 65536.0f;
-        vmat[6] = mat.tx;
-        vmat[7] = mat.ty;
-        
-        vgSeti (VG_MATRIX_MODE, VG_MATRIX_FILL_PAINT_TO_USER);
-        vgLoadMatrix (vmat);
-        vgSeti (VG_MATRIX_MODE, VG_MATRIX_STROKE_PAINT_TO_USER);
-        vgLoadMatrix (vmat);
-        vgSeti (VG_MATRIX_MODE, VG_MATRIX_PATH_USER_TO_SURFACE);
-        
-        if (wrap_mode == WRAP_CLAMP) {  
-            vgSetParameteri (_vgpaint, VG_PAINT_PATTERN_TILING_MODE, 
VG_TILE_PAD);
-        } else {
-            vgSetParameteri (_vgpaint, VG_PAINT_PATTERN_TILING_MODE, 
VG_TILE_REPEAT);
-        }
-    }
-
+               bitmap_wrap_mode wrap_mode) const;
     // Accessors for the GnashImage internal data
     int getWidth() { return _image->width(); };
     int getHeight() { return _image->height(); };

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


commit cf6c2decbafd64c63a9785516dbc790c7f995b92
Author: Rob Savoye <address@hidden>
Date:   Mon Dec 27 19:38:16 2010 -0700

    move code from header to be easier to debug and more compact

diff --git a/librender/openvg/OpenVGBitmap.cpp 
b/librender/openvg/OpenVGBitmap.cpp
new file mode 100644
index 0000000..c94c778
--- /dev/null
+++ b/librender/openvg/OpenVGBitmap.cpp
@@ -0,0 +1,125 @@
+// 
+//   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
+
+#include "Geometry.h"
+#include "CachedBitmap.h"
+#include "GnashImage.h"
+#include "Renderer.h"
+#include "openvg/Renderer_ovg.h"
+#include "openvg/OpenVGBitmap.h"
+
+namespace gnash {
+
+namespace renderer {
+
+namespace openvg {
+
+OpenVGBitmap::OpenVGBitmap(std::auto_ptr<image::GnashImage> im)
+    : _image(im.release())
+{
+    GNASH_REPORT_FUNCTION;
+}
+
+OpenVGBitmap::OpenVGBitmap(std::auto_ptr<image::GnashImage> im,
+                           VGImageFormat pixelformat, VGPaint vgpaint)
+    : _image(im.release()),
+      _pixel_format(pixelformat),
+      _vgpaint(vgpaint)
+{
+    GNASH_REPORT_FUNCTION;
+    
+    size_t width = _image->width();
+    size_t height = _image->height();
+
+    // Create a VG image, and copy the GnashImage data into it
+    _vgimage = vgCreateImage(VG_sRGB_565, width, height,
+                             VG_IMAGE_QUALITY_FASTER);    
+    
+    vgImageSubData(_vgimage, _image->begin(), width * 4, VG_sRGB_565,
+                   0, 0, width, height);
+    
+    _tex_size += width * height * 4;
+    log_debug("Add Texture size:%d (%d x %d x %dbpp)", width * height * 4, 
+              width, height, 4);
+    log_debug("Current Texture size: %d", _tex_size);
+} 
+
+OpenVGBitmap::~OpenVGBitmap()
+{
+    GNASH_REPORT_FUNCTION;
+    
+    _tex_size -= _image->width() * _image->height() * 4;
+    log_debug(_("Remove Texture size:%d (%d x %d x %dbpp)"),
+              _image->width() * _image->height() * 4,
+              _image->width(), _image->height(), 4);
+    log_debug(_("Current Texture size: %d"), _tex_size);
+    
+    vgDestroyImage(_vgimage);
+}
+
+image::GnashImage&
+OpenVGBitmap::image()
+{
+    GNASH_REPORT_FUNCTION;
+    if (_image) {
+        return *_image;
+    }
+}    
+
+void
+OpenVGBitmap::apply(const gnash::SWFMatrix& bitmap_matrix,
+                    bitmap_wrap_mode wrap_mode) const
+{
+    GNASH_REPORT_FUNCTION;
+    gnash::SWFMatrix mat;
+    VGfloat     vmat[9];
+    
+    mat = bitmap_matrix;
+    
+    vgSetParameteri (_vgpaint, VG_PAINT_TYPE, VG_PAINT_TYPE_PATTERN);
+    vgPaintPattern (_vgpaint, _vgimage);
+    
+    mat.invert();
+    memset(vmat, 0, sizeof(vmat));
+    vmat[0] = mat.sx  / 65536.0f;
+    vmat[1] = mat.shx / 65536.0f;
+    vmat[3] = mat.shy / 65536.0f;
+    vmat[4] = mat.sy  / 65536.0f;
+    vmat[6] = mat.tx;
+    vmat[7] = mat.ty;
+    
+    vgSeti (VG_MATRIX_MODE, VG_MATRIX_FILL_PAINT_TO_USER);
+    vgLoadMatrix (vmat);
+    vgSeti (VG_MATRIX_MODE, VG_MATRIX_STROKE_PAINT_TO_USER);
+    vgLoadMatrix (vmat);
+    vgSeti (VG_MATRIX_MODE, VG_MATRIX_PATH_USER_TO_SURFACE);
+    
+    if (wrap_mode == WRAP_CLAMP) {  
+        vgSetParameteri (_vgpaint, VG_PAINT_PATTERN_TILING_MODE, VG_TILE_PAD);
+    } else {
+        vgSetParameteri (_vgpaint, VG_PAINT_PATTERN_TILING_MODE, 
VG_TILE_REPEAT);
+    }
+}
+
+} // namespace gnash::renderer::openvg
+} // namespace gnash::renderer
+} // namespace gnash
+
+// local Variables:
+// mode: C++
+// indent-tabs-mode: nil
+// End:

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

Summary of changes:
 gui/gtk/gtk_glue_ovg.cpp          |    2 +-
 librender/Makefile.am             |    4 +-
 librender/openvg/OpenVGBitmap.cpp |  125 +++++++++++++++++++++++++++++++++++++
 librender/openvg/OpenVGBitmap.h   |   87 +++-----------------------
 librender/openvg/Renderer_ovg.cpp |   74 ----------------------
 5 files changed, 137 insertions(+), 155 deletions(-)
 create mode 100644 librender/openvg/OpenVGBitmap.cpp


hooks/post-receive
-- 
Gnash



reply via email to

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