gnash-commit
[Top][All Lists]
Advanced

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

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


From: Bastiaan Jacques
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-1953-g4c73616
Date: Fri, 25 Apr 2014 21:08:31 +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, master has been updated
       via  4c7361673dcdead92aab8e4582fe337c1fd8afcf (commit)
      from  5933b6f014f7c5af3e0282271be291fe817ad9d9 (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=4c7361673dcdead92aab8e4582fe337c1fd8afcf


commit 4c7361673dcdead92aab8e4582fe337c1fd8afcf
Author: Bastiaan Jacques <address@hidden>
Date:   Fri Apr 25 23:06:26 2014 +0200

    Chuck out gl_get_error_string() and use gluErrorString() instead.

diff --git a/libdevice/vaapi/VaapiSurfaceGLX.cpp 
b/libdevice/vaapi/VaapiSurfaceGLX.cpp
index 91a7cc5..96e6b8d 100644
--- a/libdevice/vaapi/VaapiSurfaceGLX.cpp
+++ b/libdevice/vaapi/VaapiSurfaceGLX.cpp
@@ -19,43 +19,15 @@
 
 #include <va/va_glx.h>
 #include <va/va_x11.h>
+#include <GL/glu.h>
 
 #include "log.h"
 #include "VaapiSurfaceGLX.h"
 #include "VaapiGlobalContext.h"
 #include "vaapi_utils.h"
 
-namespace gnash {
-
-// Returns a string representation of an OpenGL error
-static const char *gl_get_error_string(GLenum error)
-{
-    static const struct {
-        GLenum val;
-        const char *str;
-    }
-    gl_errors[] = {
-        { GL_NO_ERROR,          "no error" },
-        { GL_INVALID_ENUM,      "invalid enumerant" },
-        { GL_INVALID_VALUE,     "invalid value" },
-        { GL_INVALID_OPERATION, "invalid operation" },
-        { GL_STACK_OVERFLOW,    "stack overflow" },
-        { GL_STACK_UNDERFLOW,   "stack underflow" },
-        { GL_OUT_OF_MEMORY,     "out of memory" },
-#ifdef GL_INVALID_FRAMEBUFFER_OPERATION_EXT
-        { GL_INVALID_FRAMEBUFFER_OPERATION_EXT, "invalid framebuffer 
operation" },
-#endif
-        { ~0, NULL }
-    };
 
-    int i;
-    for (i = 0; gl_errors[i].str; i++) {
-        if (gl_errors[i].val == error) {
-            return gl_errors[i].str;
-        }
-    }
-    return "unknown";
-}
+namespace gnash {
 
 static inline bool gl_do_check_error(int report)
 {
@@ -63,7 +35,7 @@ static inline bool gl_do_check_error(int report)
     bool is_error = false;
     while ((error = glGetError()) != GL_NO_ERROR) {
         if (report) {
-            vaapi_dprintf("glError: %s caught\n", gl_get_error_string(error));
+            vaapi_dprintf("glError: %s caught\n", gluErrorString(error));
         }
         is_error = true;
     }
diff --git a/librender/GnashTexture.cpp b/librender/GnashTexture.cpp
index d024296..bd75262 100644
--- a/librender/GnashTexture.cpp
+++ b/librender/GnashTexture.cpp
@@ -20,6 +20,7 @@
 
 #include "GnashTexture.h"
 #include <GL/gl.h>
+#include <GL/glu.h>
 
 #define GL_DEBUG 0
 
@@ -37,37 +38,13 @@ struct gl_errors_t {
      const char *str;
 };
 
-// Returns a string representation of an OpenGL error
-static const char *gl_get_error_string(GLenum error)
-{
-    gl_errors_t gl_errors[] = {
-        { GL_NO_ERROR,          "no error" },
-        { GL_INVALID_ENUM,      "invalid enumerant" },
-        { GL_INVALID_VALUE,     "invalid value" },
-        { GL_INVALID_OPERATION, "invalid operation" },
-        { GL_STACK_OVERFLOW,    "stack overflow" },
-        { GL_STACK_UNDERFLOW,   "stack underflow" },
-        { GL_OUT_OF_MEMORY,     "out of memory" },
-#ifdef GL_INVALID_FRAMEBUFFER_OPERATION_EXT
-        { GL_INVALID_FRAMEBUFFER_OPERATION_EXT, "invalid framebuffer 
operation" },
-#endif
-    };
-
-    for (gl_errors_t *it = boost::begin(gl_errors), *end = 
boost::end(gl_errors);
-         it != end; ++it) {
-        if (it->val == error)
-            return it->str;
-    }
-    return "unknown";
-}
-
 static inline bool gl_do_check_error(int report)
 {
     GLenum error;
     bool is_error = false;
     while ((error = glGetError()) != GL_NO_ERROR) {
         if (report)
-            log_error(_("glError: %s caught\n"), gl_get_error_string(error));
+            log_error(_("glError: %s caught\n"), gluErrorString(error));
         is_error = true;
     }
     return is_error;

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

Summary of changes:
 libdevice/vaapi/VaapiSurfaceGLX.cpp |   34 +++-------------------------------
 librender/GnashTexture.cpp          |   27 ++-------------------------
 2 files changed, 5 insertions(+), 56 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

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