gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] [SCM] Gnash branch, hwaccel, updated. release_0_8_9_final


From: Rob Savoye
Subject: [Gnash-commit] [SCM] Gnash branch, hwaccel, updated. release_0_8_9_final-770-g3305d06
Date: Mon, 02 May 2011 22:35:21 +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, hwaccel has been updated
       via  3305d06784a094be758fb8b4ed84b1ea6a212092 (commit)
       via  28a0ae4ba7456515083d54d437e8ba28fd0ed77c (commit)
       via  5f7dca92f3fbad0238e509836146d962c6508840 (commit)
       via  55f51194212ecd0efc50d644b2249ce20cb877ea (commit)
       via  a9fd70b45d8fd27ccf9339258b4958da41a5c10e (commit)
       via  4286c181de27daa732055e01e4b56c0028c1ebdf (commit)
      from  116d02e69545a912560a40b2a9a3e15b142648c4 (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=3305d06784a094be758fb8b4ed84b1ea6a212092


commit 3305d06784a094be758fb8b4ed84b1ea6a212092
Author: Rob Savoye <address@hidden>
Date:   Mon May 2 16:34:58 2011 -0600

    use HAVE_VA_VA_H instead of RENDERER_AGG for including the vaapi glue header

diff --git a/gui/gtk/gtk_canvas.cpp b/gui/gtk/gtk_canvas.cpp
index 99c6e8c..140c6ac 100644
--- a/gui/gtk/gtk_canvas.cpp
+++ b/gui/gtk/gtk_canvas.cpp
@@ -53,7 +53,7 @@
 // AGG support, which is the default, for rendering in the canvas.
 #include "gtk_glue_agg.h"
 
-#ifdef RENDERER_AGG
+#ifdef HAVE_VA_VA_H
 #include "gtk_glue_agg_vaapi.h"
 #endif
 

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


commit 28a0ae4ba7456515083d54d437e8ba28fd0ed77c
Author: Rob Savoye <address@hidden>
Date:   Mon May 2 08:22:57 2011 -0600

    throw an exception if we can't make the context current. Add more comments

diff --git a/libdevice/egl/eglDevice.cpp b/libdevice/egl/eglDevice.cpp
index 8c591ec..0c8f157 100644
--- a/libdevice/egl/eglDevice.cpp
+++ b/libdevice/egl/eglDevice.cpp
@@ -407,7 +407,8 @@ EGLDevice::attachWindow(GnashDevice::native_window_t window)
     if (EGL_NO_CONTEXT == _eglContext) {
         // At least on Ubuntu 10.10, this returns a successful error string
         // with LibeMesa's OpenVG 1.0 implementation. With OpenVG 1.1 on
-        // an ARM board, this works fine.
+        // an ARM board, this works fine. Even the libMesa examples fail
+        // the same way.
         boost::format fmt = boost::format(
                              _("eglCreateContext failed (error %s)")
                                            ) % getErrorString(eglGetError());
@@ -418,8 +419,12 @@ EGLDevice::attachWindow(GnashDevice::native_window_t 
window)
     
     // step6 - make the context and surface current
     if (EGL_FALSE == eglMakeCurrent(_eglDisplay, _eglSurface, _eglSurface, 
_eglContext)) {
-        log_error("eglMakeCurrent failed (error %s)",
-                  getErrorString(eglGetError()));
+        // If for some reason we get a context, but can't make it current,
+        // nothing else will work anyway, so don't continue.
+        boost::format fmt = boost::format(
+                             _("eglMakeCurrent failed (error %s)")
+                                           ) % getErrorString(eglGetError());
+        throw GnashException(fmt.str());
     }       // begin user code
 
     return true;

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


commit 5f7dca92f3fbad0238e509836146d962c6508840
Author: Rob Savoye <address@hidden>
Date:   Mon May 2 08:18:18 2011 -0600

    throw an exception if we can't create an OpenVG context, as nothing will 
work anyway

diff --git a/libdevice/egl/eglDevice.cpp b/libdevice/egl/eglDevice.cpp
index 7bdf728..8c591ec 100644
--- a/libdevice/egl/eglDevice.cpp
+++ b/libdevice/egl/eglDevice.cpp
@@ -405,8 +405,13 @@ EGLDevice::attachWindow(GnashDevice::native_window_t 
window)
     // step5 - create a context
     _eglContext = eglCreateContext(_eglDisplay, _eglConfig, EGL_NO_CONTEXT, 
NULL);
     if (EGL_NO_CONTEXT == _eglContext) {
-        log_error("eglCreateContext failed (error %s)",
-                  getErrorString(eglGetError()));
+        // At least on Ubuntu 10.10, this returns a successful error string
+        // with LibeMesa's OpenVG 1.0 implementation. With OpenVG 1.1 on
+        // an ARM board, this works fine.
+        boost::format fmt = boost::format(
+                             _("eglCreateContext failed (error %s)")
+                                           ) % getErrorString(eglGetError());
+        throw GnashException(fmt.str());
     } else {
         printEGLContext(_eglContext);
     }

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


commit 55f51194212ecd0efc50d644b2249ce20cb877ea
Author: Rob Savoye <address@hidden>
Date:   Mon May 2 07:58:07 2011 -0600

    don't initialize OpenVG like OpenGL

diff --git a/gui/gtk/gtk_canvas.cpp b/gui/gtk/gtk_canvas.cpp
index 517cd20..99c6e8c 100644
--- a/gui/gtk/gtk_canvas.cpp
+++ b/gui/gtk/gtk_canvas.cpp
@@ -304,7 +304,7 @@ gnash_canvas_setup(GnashCanvas *canvas, std::string& 
hwaccel,
         throw gnash::GnashException(fmt.str());
     }
         
-    if ((renderer == "opengl") || (renderer == "openvg")) {
+    if (renderer == "opengl") {
         // OpenGL glue needs to prepare the drawing area for OpenGL
         // rendering before
         // widgets are realized and before the configure event is fired.

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


commit a9fd70b45d8fd27ccf9339258b4958da41a5c10e
Author: Rob Savoye <address@hidden>
Date:   Mon May 2 07:32:55 2011 -0600

    merge from master

diff --git a/gui/gtk/gtk_canvas.cpp b/gui/gtk/gtk_canvas.cpp
index 15d229f..517cd20 100644
--- a/gui/gtk/gtk_canvas.cpp
+++ b/gui/gtk/gtk_canvas.cpp
@@ -25,10 +25,10 @@
 
 #include "gtk_canvas.h"
 #include "Renderer.h"
-#include "GnashException.h"
 #include "rc.h"
 #include "log.h"
 #include "gtk_glue.h"
+#include "GnashException.h"
 
 #ifdef HAVE_VA_VA_H
 #include "vaapi_utils.h"
@@ -37,23 +37,24 @@
 // OpenGL support for rendering in the canvas. This also requires
 // the GtkGL widget for GTK2.
 #ifdef HAVE_GTK_GTKGL_H
-# include "gtk_glue_gtkglext.h"
+#include "gtk_glue_gtkglext.h"
 #endif
 
-#ifdef RENDERER_OPENVG
-# include "gtk_glue_ovg.h"
+// Cairo support for rendering in the canvas.
+#ifdef RENDERER_CAIRO
+#include "gtk_glue_cairo.h"
 #endif
 
 // Cairo support for rendering in the canvas.
-#ifdef HAVE_CAIRO_H
-# include "gtk_glue_cairo.h"
+#ifdef RENDERER_OPENVG
+#include "gtk_glue_ovg.h"
 #endif
 
 // AGG support, which is the default, for rendering in the canvas.
 #include "gtk_glue_agg.h"
 
-#ifdef HAVE_VA_VA_H
-# include "gtk_glue_agg_vaapi.h"
+#ifdef RENDERER_AGG
+#include "gtk_glue_agg_vaapi.h"
 #endif
 
 struct _GnashCanvas
@@ -79,19 +80,15 @@ namespace {
     gnash::RcInitFile& rcfile = gnash::RcInitFile::getDefaultInstance();
 }
 
-// allocate memory for GtkCanvas
 GtkWidget *
 gnash_canvas_new ()
 {
-    GNASH_REPORT_FUNCTION;
     return GTK_WIDGET(g_object_new (GNASH_TYPE_CANVAS, NULL));
 }
 
-// Initialize canvas,set allocate, expose, comfigure, realize event handlers
 static void
 gnash_canvas_class_init(GnashCanvasClass *gnash_canvas_class)
 {
-    GNASH_REPORT_FUNCTION;
     GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(gnash_canvas_class);
 
     parent_class = (GObjectClass 
*)g_type_class_peek_parent(gnash_canvas_class);
@@ -102,11 +99,9 @@ gnash_canvas_class_init(GnashCanvasClass 
*gnash_canvas_class)
     widget_class->realize = gnash_canvas_realize;
 }
 
-// Disable double bufferinf in the canvas, add reaize event handlers
 static void
 gnash_canvas_init(GnashCanvas *canvas)
 {
-    GNASH_REPORT_FUNCTION;
 
     canvas->renderer.reset();
 
@@ -123,7 +118,6 @@ gnash_canvas_init(GnashCanvas *canvas)
 static void
 gnash_canvas_size_allocate(GtkWidget *widget, GtkAllocation *allocation)
 {
-    GNASH_REPORT_FUNCTION;
     GnashCanvas *canvas = GNASH_CANVAS(widget);
 
     gnash::log_debug("gnash_canvas_size_allocate %d %d", allocation->width,
@@ -153,7 +147,6 @@ gnash_canvas_expose_event(GtkWidget *widget, GdkEventExpose 
*event)
 static gboolean
 gnash_canvas_configure_event(GtkWidget *widget, GdkEventConfigure *event)
 {
-    GNASH_REPORT_FUNCTION;
     GnashCanvas *canvas = GNASH_CANVAS(widget);
 
     canvas->glue->configure(widget, event);
@@ -164,11 +157,8 @@ gnash_canvas_configure_event(GtkWidget *widget, 
GdkEventConfigure *event)
 static void
 gnash_canvas_realize(GtkWidget *widget)
 {
-    GNASH_REPORT_FUNCTION;
-    
     GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
 
-    GnashCanvas *canvas = GNASH_CANVAS(widget);
     GdkWindowAttr attributes;
     attributes.window_type = GDK_WINDOW_CHILD;
     attributes.x = widget->allocation.x;
@@ -187,19 +177,18 @@ gnash_canvas_realize(GtkWidget *widget)
                                     &attributes, attributes_mask);
     gdk_window_set_user_data (widget->window, widget);
 
-    if (canvas->glue->needsDrawingArea()) {
-       // cairo needs the _drawingArea.window to prepare it ..
-       // TODO: find a way to make 'glue' use independent from actual
-       // renderer in use
-       canvas->glue->prepDrawingArea(GTK_WIDGET(canvas));
-    }
+#if defined(RENDERER_CAIRO) || defined(RENDERER_AGG)
+    GnashCanvas *canvas = GNASH_CANVAS(widget);
+    // cairo needs the _drawingArea.window to prepare it ..
+    // TODO: find a way to make 'glue' use independent from actual
+    // renderer in use
+    canvas->glue->prepDrawingArea(GTK_WIDGET(canvas));
+#endif
 }
 
 static void
 gnash_canvas_after_realize(GtkWidget *widget)
 {
-    GNASH_REPORT_FUNCTION;
-    
     GnashCanvas *canvas = GNASH_CANVAS(widget);
 
     canvas->renderer.reset(canvas->glue->createRenderHandler());
@@ -208,125 +197,114 @@ gnash_canvas_after_realize(GtkWidget *widget)
                                         widget->allocation.height);
 }
 
-// Select renderer and hwaccel, prep canvas for drawing
 void
 gnash_canvas_setup(GnashCanvas *canvas, std::string& hwaccel,
         std::string& renderer, int argc, char **argv[])
 {
-    GNASH_REPORT_FUNCTION;
 
-    // Order should be VAAPI, Xv, Omap
+    // Order should be VAAPI, Xv, X11
     bool initialized_renderer = false;
 
     // If a renderer hasn't been defined in gnashrc, or on the command
     // line, pick a sensible default.
     if (renderer.empty()) {
+#ifdef RENDERER_AGG
         renderer = "agg";
+#elif defined (RENDERER_CAIRO)
+        renderer = "cairo";
+#elif defined (RENDERER_OGL)
+        renderer = "opengl";
+#elif defined (RENDERER_OPENVG)
+        renderer = "openvg";
+#endif
     }
-    std::string next_renderer = renderer;
 
     // If the Hardware acceleration isn't defined in gnashrc, or on
     // the command line, pick a sensible default.
     if (hwaccel.empty()) {
         hwaccel = "none";
     }
-    std::string next_hwaccel = hwaccel;
 
-    while (!initialized_renderer) {
-        gnash::log_debug("Trying Renderer %s, and HWAccel %s", renderer, 
hwaccel);
-        renderer = next_renderer;
-        hwaccel = next_hwaccel;
 #ifdef HAVE_VA_VA_H
-        // Global enable VA-API, if requested
-        gnash::vaapi_set_is_enabled(hwaccel == "vaapi");
+    // Global enable VA-API, if requested
+    gnash::vaapi_set_is_enabled(hwaccel == "vaapi");
 #endif
-#ifdef RENDERER_OPENVG
-       // Use OpenVG, which uses EGL as the display API. This works with
-       // Mesa on desktop unix systems, and on ARM based devices running
-       // Linux, often with manufacturer provided SDKs.
-        if ((renderer == "openvg") || (renderer == "ovg")) {
-            canvas->glue.reset(new gnash::gui::GtkOvgGlue);
-            // Set the renderer to the next one to try if initializing
-            // fails.
-            next_renderer = "agg";
-        }
-#endif
-        // Use the Cairo renderer. Cairo is also used by GTK2, so using
-        // Cairo makes much sense. Unfortunately, our implementation seems
-        // to have serious performance issues, although it does work.
+
+    // Use the Cairo renderer. Cairo is also used by GTK2, so using
+    // Cairo makes much sense. Unfortunately, our implementation seems
+    // to have serious performance issues, although it does work.
+    if (renderer == "cairo") {
 #ifdef RENDERER_CAIRO
-        if (renderer == "cairo") {
-            canvas->glue.reset(new gnash::GtkCairoGlue);
-            // Set the renderer to the next one to try if initializing
-            // fails.
-            next_renderer = "agg";
-        }
+        canvas->glue.reset(new gnash::GtkCairoGlue);
+#else
+        boost::format fmt = boost::format("Support for renderer %1% "
+                " was not built") % renderer;
+        throw gnash::GnashException(fmt.str());
 #endif
+    }
 
+    else if (renderer == "opengl") {
 #ifdef RENDERER_OPENGL
-        if (renderer == "opengl") {
-            canvas->glue.reset(new gnash::GtkGlExtGlue);
-            // Set the renderer to the next one to try if initializing
-            // fails.
-            next_renderer = "agg";
-            // Use the AGG software library for rendering. While this runs
-            // on any hardware platform, it does have performance issues
-            // on low-end platforms without a GPU. So while AGG may render
-            // streaming video over a network connection just fine,
-            // anything below about 600Mhz CPU may have buffering and
-            // rendering performance issues.
-        }
+        canvas->glue.reset(new gnash::GtkGlExtGlue);
+#else
+        boost::format fmt = boost::format("Support for renderer %1% "
+                " was not built") % renderer;
+        throw gnash::GnashException(fmt.str());
+#endif
+    }
+    else if ((renderer == "openvg") || (renderer == "ovg")) {
+       renderer = "openvg";
+#ifdef RENDERER_OPENVG
+        canvas->glue.reset(new gnash::gui::GtkOvgGlue);
+#else
+        boost::format fmt = boost::format("Support for renderer %1% "
+                " was not built") % renderer;
+        throw gnash::GnashException(fmt.str());
 #endif
-        if (renderer == "agg") {
-            // Use LibVva, which works on Nvidia, AT, or Intel 965 GPUs
-            // with AGG or OpenGL.
+    }
+    else if (renderer == "agg") {
+        // Use the AGG software library for rendering. While this runs
+        // on any hardware platform, it does have performance issues
+        // on low-end platforms without a GPU. So while AGG may render
+        // streaming video over a network connection just fine,
+        // anything below about 600Mhz CPU may have buffering and
+        // rendering performance issues.
+        // Use LibVva, which works on Nvidia, AT, or Intel 965 GPUs
+        // with AGG or OpenGL.
 #ifdef HAVE_VA_VA_H
-            if (hwaccel == "vaapi") {
-                canvas->glue.reset(new gnash::GtkAggVaapiGlue);
-                // Set the hardware acclerator to the next one to try
-                // if initializing fails.
-                next_hwaccel = "xv";
-            } else
+        if (hwaccel == "vaapi") {
+            canvas->glue.reset(new gnash::GtkAggVaapiGlue);
+            // Set the hardware acclerator to the next one to try
+            // if initializing fails.
+        } else
 #endif
 #ifdef RENDERER_AGG
-                {
-                    canvas->glue.reset(new gnash::GtkAggGlue);
-                }
-#else // end of RENDERER_AGG
-# ifdef RENDERER_OPENVG
-            {
-                canvas->glue.reset(new gnash::gui::GtkOvgGlue);
-            }
-# endif // end of RENDERER_OPENVG
-#endif   // end of AGG
-            if (canvas->glue.get()) {
-                boost::format fmt = boost::format("Support for renderer %1% "
-                                                  "was not built") % renderer;
-                throw gnash::GnashException(fmt.str());
-#ifdef RENDERER_AGG
-                canvas->glue.reset(new gnash::GtkAggGlue);
-#endif
-#ifdef RENDERER_OPENVG
-                canvas->glue.reset(new gnash::gui::GtkOvgGlue);
-#endif
-            }
-        }
-        
-        // Initialize the canvas for rendering into
-        initialized_renderer = canvas->glue->init(argc, argv);
-        // If the renderer with the least dependencies fails, we can't
-        // proceed.
-        if (!initialized_renderer && (renderer == "agg") &&
-            (hwaccel == "none")) {
-            break;
+        {
+            canvas->glue.reset(new gnash::GtkAggGlue);
         }
-        if (!initialized_renderer) {
-            gnash::log_debug("Trying to find new Renderer %s, and HWAccel %s",
-                             renderer, hwaccel);
-        }
-    } // end of while initialized_renderer
+#else // ndef RENDERER_AGG
+        boost::format fmt = boost::format("Support for renderer %1% "
+                "was not built") % renderer;
+        throw gnash::GnashException(fmt.str());
+#endif
+    }
+    else {
+        boost::format fmt = boost::format("Non-existent renderer %1% "
+            "specified") % renderer;
+        throw gnash::GnashException(fmt.str());
+    }
+
+    // Initialize the canvas for rendering into
+    initialized_renderer = canvas->glue->init(argc, argv);
+    // If the renderer with the least dependencies fails, we can't
+    // proceed.
+    if (!initialized_renderer) {
+        boost::format fmt = boost::format("Requested renderer %1% (hwaccel: "
+                "%2%) could not be initialized") % renderer % hwaccel;
+        throw gnash::GnashException(fmt.str());
+    }
         
-    if (initialized_renderer && (renderer == "opengl" || renderer == 
"openvg")) {
+    if ((renderer == "opengl") || (renderer == "openvg")) {
         // OpenGL glue needs to prepare the drawing area for OpenGL
         // rendering before
         // widgets are realized and before the configure event is fired.
@@ -345,8 +323,6 @@ gnash_canvas_before_rendering(GnashCanvas *canvas, 
gnash::movie_root* stage)
 boost::shared_ptr<gnash::Renderer>
 gnash_canvas_get_renderer(GnashCanvas *canvas)
 {
-    // GNASH_REPORT_FUNCTION;
-
     return canvas->renderer;
 }
 

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


commit 4286c181de27daa732055e01e4b56c0028c1ebdf
Author: Rob Savoye <address@hidden>
Date:   Mon May 2 07:31:58 2011 -0600

    VaapiImageFormat.h is in vaapi now

diff --git a/gui/gtk/gtk_glue_agg_vaapi.h b/gui/gtk/gtk_glue_agg_vaapi.h
index 6c102f3..b0a52a1 100644
--- a/gui/gtk/gtk_glue_agg_vaapi.h
+++ b/gui/gtk/gtk_glue_agg_vaapi.h
@@ -28,7 +28,7 @@
 #include <boost/shared_ptr.hpp>
 #include <boost/scoped_array.hpp>
 #include <memory>
-#include "VaapiImageFormat.h"
+#include "vaapi/VaapiImageFormat.h"
 
 namespace gnash
 {

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

Summary of changes:
 gui/gtk/gtk_canvas.cpp       |  208 +++++++++++++++++++-----------------------
 gui/gtk/gtk_glue_agg_vaapi.h |    2 +-
 libdevice/egl/eglDevice.cpp  |   18 +++-
 3 files changed, 107 insertions(+), 121 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

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