gnash-dev
[Top][All Lists]
Advanced

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

Re: [Gnash-dev] Hardware acceleration support


From: Adrian Panasiuk
Subject: Re: [Gnash-dev] Hardware acceleration support
Date: Fri, 12 Mar 2010 20:57:08 +0100

The guis are still trying to link against librender/libgnashagg.la,
librender/libgnashcairo.la and librender/libgnashogl.la - I've checked
that symlinking librender/libgnashrender.la to those names allows
building working binaries.

A single build for all GUIs is not implemented right now, right?

I'm attaching a patch to help build when VAAPI or XV is not enabled:

=== modified file 'gui/gtk.cpp'
--- gui/gtk.cpp 2010-03-02 23:26:48 +0000
+++ gui/gtk.cpp 2010-03-12 19:42:40 +0000
@@ -39,6 +39,7 @@
 #include "va/va.h"
 #include "va/va_backend.h"
 #include "vaapi_utils.h"
+extern VAStatus va_getDriverName(VADisplay dpy, char **driver_name);
 #endif

 #ifdef HAVE_X11
@@ -78,8 +79,6 @@
 # include <hildon/hildon.h>
 #endif

-extern VAStatus va_getDriverName(VADisplay dpy, char **driver_name);
-
 namespace gnash
 {


=== modified file 'gui/gtk_canvas.cpp'
--- gui/gtk_canvas.cpp  2010-03-10 20:54:03 +0000
+++ gui/gtk_canvas.cpp  2010-03-12 19:47:05 +0000
@@ -233,8 +233,10 @@
     while (!initialized_renderer) {
         renderer = next_renderer;
         hwaccel = next_hwaccel;
+#ifdef USE_VAAPI
         // Global enable VA-API, if requested
         gnash::vaapi_set_is_enabled(hwaccel == "vaapi");
+#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.
@@ -257,6 +259,7 @@
             // rendering performance issues.
         }
         else if (renderer == "agg") {
+#ifdef USE_VAAPI
             // Use LibVva, which works on Nvidia, AT, or Intel 965 GPUs
             // with AGG or OpenGL.
             if (hwaccel == "vaapi") {
@@ -265,14 +268,19 @@
                 // if initializing fails.
                 next_hwaccel = "xv";
             }
-            else if (hwaccel == "xv") {
+            else
+#endif
+#ifdef HAVE_XV
+                if (hwaccel == "xv") {
                 // Use the X11 XV extension, which works on most GPUs.
                 canvas->glue.reset(new gnash::GtkAggXvGlue);
                 // Set the hardware acclerator to the next one to try
                 // if initializing fails.
                 next_hwaccel = "none";
             }
-            else {
+            else
+#endif
+            {
                 canvas->glue.reset(new gnash::GtkAggGlue);
             }
         }




reply via email to

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