Add GDK_GL env var and GdkGLFlags

This moves the GDK_ALWAYS_USE_GL env var to GDK_GL=always.
It also changes GDK_DEBUG=nogl to GDK_GL=disable, as GDK_DEBUG
is really only about debug loggin.

It also adds some completely new flags:

 software-draw-gl:
   Always use software fallback for drawing gl content to a cairo_t.
   This disables the fastpaths that exist for drawing directly to
   a window and instead reads back the pixels into a cairo image
   surface.

 software-draw-surface:
   Always use software fallback for drawing cairo surfaces onto a
   gl-using window.  This disables e.g. texture-from-pixmap on X11.

 software-draw:
   Enables both the above.
This commit is contained in:
Alexander Larsson
2014-11-06 10:21:48 +01:00
parent 7fde5213b0
commit 90a5fa80af
5 changed files with 34 additions and 13 deletions

View File

@ -85,10 +85,17 @@ typedef enum {
GDK_DEBUG_EVENTLOOP = 1 << 10,
GDK_DEBUG_FRAMES = 1 << 11,
GDK_DEBUG_SETTINGS = 1 << 12,
GDK_DEBUG_NOGL = 1 << 13,
GDK_DEBUG_OPENGL = 1 << 14
GDK_DEBUG_OPENGL = 1 << 13,
} GdkDebugFlag;
typedef enum {
GDK_GL_FLAGS_DISABLE = 1 << 0,
GDK_GL_FLAGS_ALWAYS = 1 << 1,
GDK_GL_FLAGS_SOFTWARE_DRAW_GL = 1 << 2,
GDK_GL_FLAGS_SOFTWARE_DRAW_SURFACE = 1 << 3,
} GdkGLFlags;
typedef enum {
GDK_RENDERING_MODE_SIMILAR = 0,
GDK_RENDERING_MODE_IMAGE,
@ -99,6 +106,7 @@ extern GList *_gdk_default_filters;
extern GdkWindow *_gdk_parent_root;
extern guint _gdk_debug_flags;
extern guint _gdk_gl_flags;
extern GdkRenderingMode _gdk_rendering_mode;
#ifdef G_ENABLE_DEBUG