[mutter] cogl: Require relative full paths when including



commit 9dbdf6b724487dee43f5988f2768a0fc3ce707c6
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Mon May 21 21:57:38 2018 +0200

    cogl: Require relative full paths when including
    
    I.e. including a OpenGL driver file, the path "driver/gl/..." must be
    specified when including.

 cogl/cogl/Makefile.am                               |  5 -----
 cogl/cogl/cogl-atlas-texture.c                      |  4 ++--
 cogl/cogl/cogl-atlas.c                              |  2 +-
 cogl/cogl/cogl-attribute.c                          |  8 ++++----
 cogl/cogl/cogl-bitmap.c                             |  2 +-
 cogl/cogl/cogl-boxed-value.c                        |  2 +-
 cogl/cogl/cogl-clip-stack.c                         |  4 +---
 cogl/cogl/cogl-context-private.h                    |  2 +-
 cogl/cogl/cogl-context.c                            | 10 +++++-----
 cogl/cogl/cogl-display.c                            |  2 +-
 cogl/cogl/cogl-feature-private.h                    |  2 ++
 cogl/cogl/cogl-fence-private.h                      |  2 +-
 cogl/cogl/cogl-fence.c                              |  2 +-
 cogl/cogl/cogl-framebuffer-private.h                |  2 +-
 cogl/cogl/cogl-framebuffer.c                        |  4 ++--
 cogl/cogl/cogl-gles2-context.c                      |  4 ++--
 cogl/cogl/cogl-glsl-shader.c                        |  2 +-
 cogl/cogl/cogl-glx-renderer-private.h               |  2 +-
 cogl/cogl/cogl-journal.c                            |  4 ++--
 cogl/cogl/cogl-matrix-stack.c                       |  2 +-
 cogl/cogl/cogl-pipeline-layer.c                     |  2 +-
 cogl/cogl/cogl-pipeline.c                           |  8 ++++----
 cogl/cogl/cogl-poll.c                               |  2 +-
 cogl/cogl/cogl-primitives.c                         |  4 ++--
 cogl/cogl/cogl-renderer-private.h                   |  2 +-
 cogl/cogl/cogl-renderer.c                           | 11 ++++++-----
 cogl/cogl/cogl-sampler-cache.c                      |  2 +-
 cogl/cogl/cogl-sub-texture.c                        |  2 +-
 cogl/cogl/cogl-texture-2d-sliced.c                  |  6 +++---
 cogl/cogl/cogl-texture-2d.c                         |  8 ++++----
 cogl/cogl/cogl-texture-3d.c                         |  6 +++---
 cogl/cogl/cogl-texture-rectangle.c                  |  4 ++--
 cogl/cogl/cogl-xlib-renderer-private.h              |  2 ++
 cogl/cogl/cogl-xlib-renderer.c                      |  2 +-
 cogl/cogl/cogl.c                                    |  8 ++++----
 cogl/cogl/deprecated/cogl-clutter.c                 |  6 +++---
 cogl/cogl/deprecated/cogl-material-compat.c         |  2 +-
 cogl/cogl/deprecated/cogl-program.c                 |  6 +++---
 cogl/cogl/deprecated/cogl-shader.c                  |  4 ++--
 cogl/cogl/deprecated/cogl-vertex-buffer.c           |  2 +-
 cogl/cogl/driver/gl/cogl-attribute-gl.c             | 10 +++++-----
 cogl/cogl/driver/gl/cogl-buffer-gl.c                |  4 ++--
 cogl/cogl/driver/gl/cogl-clip-stack-gl.c            |  6 +++---
 cogl/cogl/driver/gl/cogl-framebuffer-gl.c           |  8 ++++----
 cogl/cogl/driver/gl/cogl-pipeline-fragend-glsl.c    |  8 ++++----
 cogl/cogl/driver/gl/cogl-pipeline-opengl.c          |  8 ++++----
 cogl/cogl/driver/gl/cogl-pipeline-progend-glsl.c    | 12 ++++++------
 cogl/cogl/driver/gl/cogl-pipeline-vertend-glsl.c    |  8 ++++----
 cogl/cogl/driver/gl/cogl-texture-2d-gl.c            |  8 ++++----
 cogl/cogl/driver/gl/cogl-texture-gl.c               |  6 +++---
 cogl/cogl/driver/gl/cogl-util-gl.c                  |  2 +-
 cogl/cogl/driver/gl/gl/cogl-driver-gl.c             | 12 ++++++------
 cogl/cogl/driver/gl/gl/cogl-texture-driver-gl.c     |  6 +++---
 cogl/cogl/driver/gl/gles/cogl-driver-gles.c         | 12 ++++++------
 cogl/cogl/driver/gl/gles/cogl-texture-driver-gles.c |  6 +++---
 cogl/cogl/winsys/cogl-texture-pixmap-x11.c          |  6 +++---
 cogl/cogl/winsys/cogl-winsys-egl-private.h          |  4 ++--
 cogl/cogl/winsys/cogl-winsys-egl-x11-private.h      |  2 +-
 cogl/cogl/winsys/cogl-winsys-egl-x11.c              |  5 ++---
 cogl/cogl/winsys/cogl-winsys-egl.c                  |  9 ++++-----
 cogl/cogl/winsys/cogl-winsys-glx.c                  | 10 +++++-----
 cogl/cogl/winsys/cogl-winsys-stub.c                 |  2 +-
 62 files changed, 153 insertions(+), 157 deletions(-)
---
diff --git a/cogl/cogl/Makefile.am b/cogl/cogl/Makefile.am
index be3c28972..cac20a3c9 100644
--- a/cogl/cogl/Makefile.am
+++ b/cogl/cogl/Makefile.am
@@ -13,11 +13,6 @@ DISTCLEANFILES =
 AM_CPPFLAGS = \
        -I$(top_srcdir)                         \
        -I$(top_builddir)                       \
-       -I$(srcdir)/deprecated                  \
-       -I$(srcdir)/winsys                      \
-       -I$(srcdir)/driver/gl                   \
-       -I$(srcdir)/driver/gl/gl                \
-       -I$(srcdir)/driver/gl/gles              \
        $(NULL)
 
 AM_CPPFLAGS += \
diff --git a/cogl/cogl/cogl-atlas-texture.c b/cogl/cogl/cogl-atlas-texture.c
index 87a33b889..cae8650e7 100644
--- a/cogl/cogl/cogl-atlas-texture.c
+++ b/cogl/cogl/cogl-atlas-texture.c
@@ -44,13 +44,13 @@
 #include "cogl-texture-driver.h"
 #include "cogl-rectangle-map.h"
 #include "cogl-journal-private.h"
-#include "cogl-pipeline-opengl-private.h"
 #include "cogl-atlas.h"
 #include "cogl1-context.h"
 #include "cogl-sub-texture.h"
 #include "cogl-error-private.h"
-#include "cogl-texture-gl-private.h"
 #include "cogl-gtype-private.h"
+#include "driver/gl/cogl-pipeline-opengl-private.h"
+#include "driver/gl/cogl-texture-gl-private.h"
 
 #include <stdlib.h>
 
diff --git a/cogl/cogl/cogl-atlas.c b/cogl/cogl/cogl-atlas.c
index 66c9ed607..285269f64 100644
--- a/cogl/cogl/cogl-atlas.c
+++ b/cogl/cogl/cogl-atlas.c
@@ -38,11 +38,11 @@
 #include "cogl-texture-2d-private.h"
 #include "cogl-texture-2d-sliced.h"
 #include "cogl-texture-driver.h"
-#include "cogl-pipeline-opengl-private.h"
 #include "cogl-debug.h"
 #include "cogl-framebuffer-private.h"
 #include "cogl-blit.h"
 #include "cogl-private.h"
+#include "driver/gl/cogl-pipeline-opengl-private.h"
 
 #include <stdlib.h>
 
diff --git a/cogl/cogl/cogl-attribute.c b/cogl/cogl/cogl-attribute.c
index d27d1bd49..cc1b19f45 100644
--- a/cogl/cogl/cogl-attribute.c
+++ b/cogl/cogl/cogl-attribute.c
@@ -41,15 +41,15 @@
 #include "cogl-attribute-private.h"
 #include "cogl-pipeline.h"
 #include "cogl-pipeline-private.h"
-#include "cogl-pipeline-opengl-private.h"
 #include "cogl-texture-private.h"
 #include "cogl-framebuffer-private.h"
 #include "cogl-indices-private.h"
-#ifdef COGL_PIPELINE_PROGEND_GLSL
-#include "cogl-pipeline-progend-glsl-private.h"
-#endif
 #include "cogl-private.h"
 #include "cogl-gtype-private.h"
+#include "driver/gl/cogl-pipeline-opengl-private.h"
+#ifdef COGL_PIPELINE_PROGEND_GLSL
+#include "driver/gl/cogl-pipeline-progend-glsl-private.h"
+#endif
 
 #include <string.h>
 #include <stdio.h>
diff --git a/cogl/cogl/cogl-bitmap.c b/cogl/cogl/cogl-bitmap.c
index 11d5ea413..732fad015 100644
--- a/cogl/cogl/cogl-bitmap.c
+++ b/cogl/cogl/cogl-bitmap.c
@@ -37,9 +37,9 @@
 #include "cogl-buffer-private.h"
 #include "cogl-pixel-buffer.h"
 #include "cogl-context-private.h"
-#include "cogl-buffer-gl-private.h"
 #include "cogl-error-private.h"
 #include "cogl-gtype-private.h"
+#include "driver/gl/cogl-buffer-gl-private.h"
 
 #include <string.h>
 
diff --git a/cogl/cogl/cogl-boxed-value.c b/cogl/cogl/cogl-boxed-value.c
index c3faaa791..5976264ca 100644
--- a/cogl/cogl/cogl-boxed-value.c
+++ b/cogl/cogl/cogl-boxed-value.c
@@ -34,7 +34,7 @@
 
 #include "cogl-boxed-value.h"
 #include "cogl-context-private.h"
-#include "cogl-util-gl-private.h"
+#include "driver/gl/cogl-util-gl-private.h"
 
 CoglBool
 _cogl_boxed_value_equal (const CoglBoxedValue *bva,
diff --git a/cogl/cogl/cogl-clip-stack.c b/cogl/cogl/cogl-clip-stack.c
index 232dddfdb..3dbd2e573 100644
--- a/cogl/cogl/cogl-clip-stack.c
+++ b/cogl/cogl/cogl-clip-stack.c
@@ -44,14 +44,12 @@
 #include "cogl-matrix-private.h"
 #include "cogl-primitives-private.h"
 #include "cogl-private.h"
-#include "cogl-pipeline-opengl-private.h"
 #include "cogl-attribute-private.h"
 #include "cogl-primitive-private.h"
 #include "cogl1-context.h"
 #include "cogl-offscreen.h"
 #include "cogl-matrix-stack.h"
-
-
+#include "driver/gl/cogl-pipeline-opengl-private.h"
 
 static void *
 _cogl_clip_stack_push_entry (CoglClipStack *clip_stack,
diff --git a/cogl/cogl/cogl-context-private.h b/cogl/cogl/cogl-context-private.h
index 9e6620733..4642094a0 100644
--- a/cogl/cogl/cogl-context-private.h
+++ b/cogl/cogl/cogl-context-private.h
@@ -32,7 +32,6 @@
 #define __COGL_CONTEXT_PRIVATE_H
 
 #include "cogl-context.h"
-#include "cogl-winsys-private.h"
 #include "cogl-flags.h"
 
 #ifdef COGL_HAS_XLIB_SUPPORT
@@ -62,6 +61,7 @@
 #include "cogl-poll-private.h"
 #include "cogl-path/cogl-path-types.h"
 #include "cogl-private.h"
+#include "winsys/cogl-winsys-private.h"
 
 typedef struct
 {
diff --git a/cogl/cogl/cogl-context.c b/cogl/cogl/cogl-context.c
index 7895b8c4b..c574374ed 100644
--- a/cogl/cogl/cogl-context.c
+++ b/cogl/cogl/cogl-context.c
@@ -32,12 +32,9 @@
 
 #include "cogl-object.h"
 #include "cogl-private.h"
-#include "cogl-winsys-private.h"
-#include "winsys/cogl-winsys-stub-private.h"
 #include "cogl-profile.h"
 #include "cogl-util.h"
 #include "cogl-context-private.h"
-#include "cogl-util-gl-private.h"
 #include "cogl-display-private.h"
 #include "cogl-renderer-private.h"
 #include "cogl-journal-private.h"
@@ -46,7 +43,6 @@
 #include "cogl-texture-3d-private.h"
 #include "cogl-texture-rectangle-private.h"
 #include "cogl-pipeline-private.h"
-#include "cogl-pipeline-opengl-private.h"
 #include "cogl-framebuffer-private.h"
 #include "cogl-onscreen-private.h"
 #include "cogl-attribute-private.h"
@@ -55,8 +51,12 @@
 #include "cogl-config-private.h"
 #include "cogl-error-private.h"
 #include "cogl-gtype-private.h"
+#include "driver/gl/cogl-pipeline-opengl-private.h"
+#include "driver/gl/cogl-util-gl-private.h"
+#include "winsys/cogl-winsys-private.h"
+#include "winsys/cogl-winsys-stub-private.h"
 
-#include "cogl/deprecated/cogl-framebuffer-deprecated.h"
+#include "deprecated/cogl-framebuffer-deprecated.h"
 
 #include <string.h>
 #include <stdlib.h>
diff --git a/cogl/cogl/cogl-display.c b/cogl/cogl/cogl-display.c
index 1166e416d..7d2c21a9a 100644
--- a/cogl/cogl/cogl-display.c
+++ b/cogl/cogl/cogl-display.c
@@ -38,11 +38,11 @@
 
 #include "cogl-display-private.h"
 #include "cogl-renderer-private.h"
-#include "cogl-winsys-private.h"
 #ifdef COGL_HAS_WAYLAND_EGL_SERVER_SUPPORT
 #include "cogl-wayland-server.h"
 #endif
 #include "cogl-gtype-private.h"
+#include "winsys/cogl-winsys-private.h"
 
 static void _cogl_display_free (CoglDisplay *display);
 
diff --git a/cogl/cogl/cogl-feature-private.h b/cogl/cogl/cogl-feature-private.h
index a16c7772a..95283df33 100644
--- a/cogl/cogl/cogl-feature-private.h
+++ b/cogl/cogl/cogl-feature-private.h
@@ -33,6 +33,8 @@
 
 #include <glib.h>
 
+#include "cogl-context.h"
+#include "cogl-renderer.h"
 
 #define COGL_CHECK_GL_VERSION(driver_major, driver_minor, \
                               target_major, target_minor) \
diff --git a/cogl/cogl/cogl-fence-private.h b/cogl/cogl/cogl-fence-private.h
index abbf51ffb..d2fe839f3 100644
--- a/cogl/cogl/cogl-fence-private.h
+++ b/cogl/cogl/cogl-fence-private.h
@@ -33,7 +33,7 @@
 
 #include "cogl-fence.h"
 #include "cogl-list.h"
-#include "cogl-winsys-private.h"
+#include "winsys/cogl-winsys-private.h"
 
 typedef enum
 {
diff --git a/cogl/cogl/cogl-fence.c b/cogl/cogl/cogl-fence.c
index 37e3d4045..70ce2d95e 100644
--- a/cogl/cogl/cogl-fence.c
+++ b/cogl/cogl/cogl-fence.c
@@ -32,7 +32,7 @@
 #include "cogl-fence.h"
 #include "cogl-fence-private.h"
 #include "cogl-context-private.h"
-#include "cogl-winsys-private.h"
+#include "winsys/cogl-winsys-private.h"
 
 #define FENCE_CHECK_TIMEOUT 5000 /* microseconds */
 
diff --git a/cogl/cogl/cogl-framebuffer-private.h b/cogl/cogl/cogl-framebuffer-private.h
index 99ac2fba9..3701eab21 100644
--- a/cogl/cogl/cogl-framebuffer-private.h
+++ b/cogl/cogl/cogl-framebuffer-private.h
@@ -34,7 +34,7 @@
 #include "cogl-object-private.h"
 #include "cogl-matrix-stack-private.h"
 #include "cogl-journal-private.h"
-#include "cogl-winsys-private.h"
+#include "winsys/cogl-winsys-private.h"
 #include "cogl-attribute-private.h"
 #include "cogl-offscreen.h"
 #include "cogl-gl-header.h"
diff --git a/cogl/cogl/cogl-framebuffer.c b/cogl/cogl/cogl-framebuffer.c
index 6f1239f1e..73faae670 100644
--- a/cogl/cogl/cogl-framebuffer.c
+++ b/cogl/cogl/cogl-framebuffer.c
@@ -43,7 +43,6 @@
 #include "cogl-onscreen-template-private.h"
 #include "cogl-clip-stack.h"
 #include "cogl-journal-private.h"
-#include "cogl-winsys-private.h"
 #include "cogl-pipeline-state-private.h"
 #include "cogl-matrix-private.h"
 #include "cogl-primitive-private.h"
@@ -52,8 +51,9 @@
 #include "cogl-private.h"
 #include "cogl-primitives-private.h"
 #include "cogl-error-private.h"
-#include "cogl-texture-gl-private.h"
 #include "cogl-gtype-private.h"
+#include "driver/gl/cogl-texture-gl-private.h"
+#include "winsys/cogl-winsys-private.h"
 
 extern CoglObjectClass _cogl_onscreen_class;
 
diff --git a/cogl/cogl/cogl-gles2-context.c b/cogl/cogl/cogl-gles2-context.c
index 58efc7eaa..932ee6ca2 100644
--- a/cogl/cogl/cogl-gles2-context.c
+++ b/cogl/cogl/cogl-gles2-context.c
@@ -43,15 +43,15 @@
 #include "cogl-context-private.h"
 #include "cogl-display-private.h"
 #include "cogl-framebuffer-private.h"
-#include "cogl-framebuffer-gl-private.h"
 #include "cogl-onscreen-template-private.h"
 #include "cogl-renderer-private.h"
 #include "cogl-swap-chain-private.h"
 #include "cogl-texture-2d-gl.h"
 #include "cogl-texture-2d-private.h"
-#include "cogl-pipeline-opengl-private.h"
 #include "cogl-error-private.h"
 #include "cogl-gtype-private.h"
+#include "driver/gl/cogl-framebuffer-gl-private.h"
+#include "driver/gl/cogl-pipeline-opengl-private.h"
 
 static void _cogl_gles2_context_free (CoglGLES2Context *gles2_context);
 
diff --git a/cogl/cogl/cogl-glsl-shader.c b/cogl/cogl/cogl-glsl-shader.c
index ce5e639bf..d5d4e5c19 100644
--- a/cogl/cogl/cogl-glsl-shader.c
+++ b/cogl/cogl/cogl-glsl-shader.c
@@ -35,9 +35,9 @@
 #include "cogl-config.h"
 
 #include "cogl-context-private.h"
-#include "cogl-util-gl-private.h"
 #include "cogl-glsl-shader-private.h"
 #include "cogl-glsl-shader-boilerplate.h"
+#include "driver/gl/cogl-util-gl-private.h"
 
 #include <string.h>
 
diff --git a/cogl/cogl/cogl-glx-renderer-private.h b/cogl/cogl/cogl-glx-renderer-private.h
index 061f2ccb5..3ccdf849a 100644
--- a/cogl/cogl/cogl-glx-renderer-private.h
+++ b/cogl/cogl/cogl-glx-renderer-private.h
@@ -96,7 +96,7 @@ typedef struct _CoglGLXRenderer
 
 #define COGL_WINSYS_FEATURE_END()
 
-#include "cogl-winsys-glx-feature-functions.h"
+#include "winsys/cogl-winsys-glx-feature-functions.h"
 
 #undef COGL_WINSYS_FEATURE_BEGIN
 #undef COGL_WINSYS_FEATURE_FUNCTION
diff --git a/cogl/cogl/cogl-journal.c b/cogl/cogl/cogl-journal.c
index 956e36972..34d9bbbaf 100644
--- a/cogl/cogl/cogl-journal.c
+++ b/cogl/cogl/cogl-journal.c
@@ -35,14 +35,14 @@
 #include "cogl-journal-private.h"
 #include "cogl-texture-private.h"
 #include "cogl-pipeline-private.h"
-#include "cogl-pipeline-opengl-private.h"
-#include "cogl-vertex-buffer-private.h"
 #include "cogl-framebuffer-private.h"
 #include "cogl-profile.h"
 #include "cogl-attribute-private.h"
 #include "cogl-point-in-poly-private.h"
 #include "cogl-private.h"
 #include "cogl1-context.h"
+#include "driver/gl/cogl-pipeline-opengl-private.h"
+#include "deprecated/cogl-vertex-buffer-private.h"
 
 #include <string.h>
 #include <gmodule.h>
diff --git a/cogl/cogl/cogl-matrix-stack.c b/cogl/cogl/cogl-matrix-stack.c
index fe4d27af3..7920701d7 100644
--- a/cogl/cogl/cogl-matrix-stack.c
+++ b/cogl/cogl/cogl-matrix-stack.c
@@ -34,7 +34,6 @@
 #include "cogl-config.h"
 
 #include "cogl-context-private.h"
-#include "cogl-util-gl-private.h"
 #include "cogl-matrix-stack.h"
 #include "cogl-framebuffer-private.h"
 #include "cogl-object-private.h"
@@ -42,6 +41,7 @@
 #include "cogl-matrix-private.h"
 #include "cogl-magazine-private.h"
 #include "cogl-gtype-private.h"
+#include "driver/gl/cogl-util-gl-private.h"
 
 static void _cogl_matrix_stack_free (CoglMatrixStack *stack);
 
diff --git a/cogl/cogl/cogl-pipeline-layer.c b/cogl/cogl/cogl-pipeline-layer.c
index 055ab451a..7829304b7 100644
--- a/cogl/cogl/cogl-pipeline-layer.c
+++ b/cogl/cogl/cogl-pipeline-layer.c
@@ -42,9 +42,9 @@
 #include "cogl-pipeline-layer-state-private.h"
 #include "cogl-pipeline-layer-state.h"
 #include "cogl-node-private.h"
-#include "cogl-pipeline-opengl-private.h"
 #include "cogl-context-private.h"
 #include "cogl-texture-private.h"
+#include "driver/gl/cogl-pipeline-opengl-private.h"
 
 #include <string.h>
 
diff --git a/cogl/cogl/cogl-pipeline.c b/cogl/cogl/cogl-pipeline.c
index 842af5469..12bb543cf 100644
--- a/cogl/cogl/cogl-pipeline.c
+++ b/cogl/cogl/cogl-pipeline.c
@@ -38,7 +38,6 @@
 #include "cogl-object.h"
 
 #include "cogl-pipeline-private.h"
-#include "cogl-pipeline-opengl-private.h"
 #include "cogl-pipeline-state-private.h"
 #include "cogl-pipeline-layer-state-private.h"
 #include "cogl-texture-private.h"
@@ -50,6 +49,7 @@
 #include "cogl-depth-state-private.h"
 #include "cogl1-context.h"
 #include "cogl-gtype-private.h"
+#include "driver/gl/cogl-pipeline-opengl-private.h"
 
 #include <glib.h>
 #include <glib/gprintf.h>
@@ -67,15 +67,15 @@ const CoglPipelineProgend *
 _cogl_pipeline_progends[MAX (COGL_PIPELINE_N_PROGENDS, 1)];
 
 #ifdef COGL_PIPELINE_FRAGEND_GLSL
-#include "cogl-pipeline-fragend-glsl-private.h"
+#include "driver/gl/cogl-pipeline-fragend-glsl-private.h"
 #endif
 
 #ifdef COGL_PIPELINE_VERTEND_GLSL
-#include "cogl-pipeline-vertend-glsl-private.h"
+#include "driver/gl/cogl-pipeline-vertend-glsl-private.h"
 #endif
 
 #ifdef COGL_PIPELINE_PROGEND_GLSL
-#include "cogl-pipeline-progend-glsl-private.h"
+#include "driver/gl/cogl-pipeline-progend-glsl-private.h"
 #endif
 
 COGL_OBJECT_DEFINE (Pipeline, pipeline);
diff --git a/cogl/cogl/cogl-poll.c b/cogl/cogl/cogl-poll.c
index b1e581011..03eef51be 100644
--- a/cogl/cogl/cogl-poll.c
+++ b/cogl/cogl/cogl-poll.c
@@ -34,8 +34,8 @@
 
 #include "cogl-poll.h"
 #include "cogl-poll-private.h"
-#include "cogl-winsys-private.h"
 #include "cogl-renderer-private.h"
+#include "winsys/cogl-winsys-private.h"
 
 struct _CoglPollSource
 {
diff --git a/cogl/cogl/cogl-primitives.c b/cogl/cogl/cogl-primitives.c
index 13d457ad2..3ff1bac7b 100644
--- a/cogl/cogl/cogl-primitives.c
+++ b/cogl/cogl/cogl-primitives.c
@@ -35,8 +35,6 @@
 #include "cogl-journal-private.h"
 #include "cogl-texture-private.h"
 #include "cogl-pipeline-private.h"
-#include "cogl-pipeline-opengl-private.h"
-#include "cogl-vertex-buffer-private.h"
 #include "cogl-framebuffer-private.h"
 #include "cogl-attribute-private.h"
 #include "cogl-private.h"
@@ -44,6 +42,8 @@
 #include "cogl-framebuffer-private.h"
 #include "cogl1-context.h"
 #include "cogl-primitives-private.h"
+#include "driver/gl/cogl-pipeline-opengl-private.h"
+#include "deprecated/cogl-vertex-buffer-private.h"
 
 #include <string.h>
 #include <math.h>
diff --git a/cogl/cogl/cogl-renderer-private.h b/cogl/cogl/cogl-renderer-private.h
index 03b0c3014..01e18a57c 100644
--- a/cogl/cogl/cogl-renderer-private.h
+++ b/cogl/cogl/cogl-renderer-private.h
@@ -34,11 +34,11 @@
 #include <gmodule.h>
 
 #include "cogl-object-private.h"
-#include "cogl-winsys-private.h"
 #include "cogl-driver.h"
 #include "cogl-texture-driver.h"
 #include "cogl-context.h"
 #include "cogl-closure-list-private.h"
+#include "winsys/cogl-winsys-private.h"
 
 #ifdef COGL_HAS_XLIB_SUPPORT
 #include <X11/Xlib.h>
diff --git a/cogl/cogl/cogl-renderer.c b/cogl/cogl/cogl-renderer.c
index 8783c891c..b51ad1a97 100644
--- a/cogl/cogl/cogl-renderer.c
+++ b/cogl/cogl/cogl-renderer.c
@@ -38,23 +38,24 @@
 #include "cogl-private.h"
 #include "cogl-object.h"
 #include "cogl-context-private.h"
-#include "cogl-util-gl-private.h"
 #include "cogl-mutter.h"
 
 #include "cogl-renderer.h"
 #include "cogl-renderer-private.h"
 #include "cogl-display-private.h"
-#include "cogl-winsys-private.h"
-#include "cogl-winsys-stub-private.h"
 #include "cogl-config-private.h"
 #include "cogl-error-private.h"
 #include "cogl-gtype-private.h"
 
+#include "driver/gl/cogl-util-gl-private.h"
+#include "winsys/cogl-winsys-private.h"
+#include "winsys/cogl-winsys-stub-private.h"
+
 #ifdef COGL_HAS_EGL_PLATFORM_XLIB_SUPPORT
-#include "cogl-winsys-egl-x11-private.h"
+#include "winsys/cogl-winsys-egl-x11-private.h"
 #endif
 #ifdef COGL_HAS_GLX_SUPPORT
-#include "cogl-winsys-glx-private.h"
+#include "winsys/cogl-winsys-glx-private.h"
 #endif
 
 #ifdef COGL_HAS_XLIB_SUPPORT
diff --git a/cogl/cogl/cogl-sampler-cache.c b/cogl/cogl/cogl-sampler-cache.c
index bb20686e6..c72b8b247 100644
--- a/cogl/cogl/cogl-sampler-cache.c
+++ b/cogl/cogl/cogl-sampler-cache.c
@@ -34,7 +34,7 @@
 
 #include "cogl-sampler-cache-private.h"
 #include "cogl-context-private.h"
-#include "cogl-util-gl-private.h"
+#include "driver/gl/cogl-util-gl-private.h"
 
 #ifndef GL_TEXTURE_WRAP_R
 #define GL_TEXTURE_WRAP_R 0x8072
diff --git a/cogl/cogl/cogl-sub-texture.c b/cogl/cogl/cogl-sub-texture.c
index c6ceec7d8..2f803babc 100644
--- a/cogl/cogl/cogl-sub-texture.c
+++ b/cogl/cogl/cogl-sub-texture.c
@@ -42,8 +42,8 @@
 #include "cogl-texture-driver.h"
 #include "cogl-texture-rectangle-private.h"
 #include "cogl-texture-2d.h"
-#include "cogl-texture-gl-private.h"
 #include "cogl-gtype-private.h"
+#include "driver/gl/cogl-texture-gl-private.h"
 
 #include <string.h>
 #include <math.h>
diff --git a/cogl/cogl/cogl-texture-2d-sliced.c b/cogl/cogl/cogl-texture-2d-sliced.c
index 715f7bc46..4d5209dc2 100644
--- a/cogl/cogl/cogl-texture-2d-sliced.c
+++ b/cogl/cogl/cogl-texture-2d-sliced.c
@@ -44,17 +44,17 @@
 #include "cogl-texture-2d-gl.h"
 #include "cogl-texture-2d-private.h"
 #include "cogl-texture-2d-sliced-private.h"
-#include "cogl-texture-gl-private.h"
 #include "cogl-texture-driver.h"
 #include "cogl-context-private.h"
 #include "cogl-object-private.h"
 #include "cogl-spans.h"
 #include "cogl-journal-private.h"
-#include "cogl-pipeline-opengl-private.h"
 #include "cogl-primitive-texture.h"
 #include "cogl-error-private.h"
-#include "cogl-texture-gl-private.h"
 #include "cogl-gtype-private.h"
+#include "driver/gl/cogl-texture-gl-private.h"
+#include "driver/gl/cogl-pipeline-opengl-private.h"
+#include "driver/gl/cogl-texture-gl-private.h"
 
 #include <string.h>
 #include <stdlib.h>
diff --git a/cogl/cogl/cogl-texture-2d.c b/cogl/cogl/cogl-texture-2d.c
index dc57aee28..c0d14ed1e 100644
--- a/cogl/cogl/cogl-texture-2d.c
+++ b/cogl/cogl/cogl-texture-2d.c
@@ -37,18 +37,18 @@
 #include "cogl-util.h"
 #include "cogl-texture-private.h"
 #include "cogl-texture-2d-private.h"
-#include "cogl-texture-2d-gl-private.h"
 #include "cogl-texture-driver.h"
 #include "cogl-context-private.h"
 #include "cogl-object-private.h"
 #include "cogl-journal-private.h"
-#include "cogl-pipeline-opengl-private.h"
 #include "cogl-framebuffer-private.h"
 #include "cogl-error-private.h"
+#include "cogl-gtype-private.h"
+#include "driver/gl/cogl-texture-2d-gl-private.h"
+#include "driver/gl/cogl-pipeline-opengl-private.h"
 #ifdef COGL_HAS_EGL_SUPPORT
-#include "cogl-winsys-egl-private.h"
+#include "winsys/cogl-winsys-egl-private.h"
 #endif
-#include "cogl-gtype-private.h"
 
 #include <string.h>
 #include <math.h>
diff --git a/cogl/cogl/cogl-texture-3d.c b/cogl/cogl/cogl-texture-3d.c
index 119f4deca..d6bc683a6 100644
--- a/cogl/cogl/cogl-texture-3d.c
+++ b/cogl/cogl/cogl-texture-3d.c
@@ -36,16 +36,16 @@
 #include "cogl-texture-private.h"
 #include "cogl-texture-3d-private.h"
 #include "cogl-texture-3d.h"
-#include "cogl-texture-gl-private.h"
 #include "cogl-texture-driver.h"
 #include "cogl-context-private.h"
 #include "cogl-object-private.h"
 #include "cogl-journal-private.h"
 #include "cogl-pipeline-private.h"
-#include "cogl-pipeline-opengl-private.h"
 #include "cogl-error-private.h"
-#include "cogl-util-gl-private.h"
 #include "cogl-gtype-private.h"
+#include "driver/gl/cogl-texture-gl-private.h"
+#include "driver/gl/cogl-pipeline-opengl-private.h"
+#include "driver/gl/cogl-util-gl-private.h"
 
 #include <string.h>
 #include <math.h>
diff --git a/cogl/cogl/cogl-texture-rectangle.c b/cogl/cogl/cogl-texture-rectangle.c
index c15b20a02..8db7d75dc 100644
--- a/cogl/cogl/cogl-texture-rectangle.c
+++ b/cogl/cogl/cogl-texture-rectangle.c
@@ -41,10 +41,10 @@
 #include "cogl-context-private.h"
 #include "cogl-object-private.h"
 #include "cogl-journal-private.h"
-#include "cogl-pipeline-opengl-private.h"
 #include "cogl-error-private.h"
-#include "cogl-util-gl-private.h"
 #include "cogl-gtype-private.h"
+#include "driver/gl/cogl-pipeline-opengl-private.h"
+#include "driver/gl/cogl-util-gl-private.h"
 
 #include <string.h>
 #include <math.h>
diff --git a/cogl/cogl/cogl-xlib-renderer-private.h b/cogl/cogl/cogl-xlib-renderer-private.h
index ea0ee906f..2a80d215e 100644
--- a/cogl/cogl/cogl-xlib-renderer-private.h
+++ b/cogl/cogl/cogl-xlib-renderer-private.h
@@ -31,6 +31,8 @@
 #ifndef __COGL_RENDERER_XLIB_PRIVATE_H
 #define __COGL_RENDERER_XLIB_PRIVATE_H
 
+#include <X11/Xutil.h>
+
 #include "cogl-object-private.h"
 #include "cogl-xlib-private.h"
 #include "cogl-x11-renderer-private.h"
diff --git a/cogl/cogl/cogl-xlib-renderer.c b/cogl/cogl/cogl-xlib-renderer.c
index fe5b6d9a2..f0259531f 100644
--- a/cogl/cogl/cogl-xlib-renderer.c
+++ b/cogl/cogl/cogl-xlib-renderer.c
@@ -39,9 +39,9 @@
 #include "cogl-renderer-private.h"
 #include "cogl-xlib-renderer-private.h"
 #include "cogl-x11-renderer-private.h"
-#include "cogl-winsys-private.h"
 #include "cogl-error-private.h"
 #include "cogl-poll-private.h"
+#include "winsys/cogl-winsys-private.h"
 
 #include <X11/Xlib.h>
 #include <X11/extensions/Xdamage.h>
diff --git a/cogl/cogl/cogl.c b/cogl/cogl/cogl.c
index 74e313733..296999010 100644
--- a/cogl/cogl/cogl.c
+++ b/cogl/cogl/cogl.c
@@ -39,8 +39,6 @@
 #include "cogl-util.h"
 #include "cogl-context-private.h"
 #include "cogl-pipeline-private.h"
-#include "cogl-pipeline-opengl-private.h"
-#include "cogl-winsys-private.h"
 #include "cogl-framebuffer-private.h"
 #include "cogl-matrix-private.h"
 #include "cogl-journal-private.h"
@@ -54,8 +52,10 @@
 #include "cogl-private.h"
 #include "cogl1-context.h"
 #include "cogl-offscreen.h"
-#include "cogl-attribute-gl-private.h"
-#include "cogl-clutter.h"
+#include "driver/gl/cogl-pipeline-opengl-private.h"
+#include "driver/gl/cogl-attribute-gl-private.h"
+#include "winsys/cogl-winsys-private.h"
+#include "deprecated/cogl-clutter.h"
 
 #include "deprecated/cogl-framebuffer-deprecated.h"
 
diff --git a/cogl/cogl/deprecated/cogl-clutter.c b/cogl/cogl/deprecated/cogl-clutter.c
index 20b1da2a7..2c57bb18a 100644
--- a/cogl/cogl/deprecated/cogl-clutter.c
+++ b/cogl/cogl/deprecated/cogl-clutter.c
@@ -38,15 +38,15 @@
 #include "cogl-types.h"
 #include "cogl-private.h"
 #include "cogl-context-private.h"
-#include "cogl-winsys-private.h"
-#include "cogl-winsys-stub-private.h"
 #include "cogl-framebuffer-private.h"
 #include "cogl-onscreen-private.h"
 #ifdef COGL_HAS_XLIB_SUPPORT
 #include "cogl-clutter-xlib.h"
 #include "cogl-xlib-renderer.h"
 #endif
-#include "cogl-clutter.h"
+#include "winsys/cogl-winsys-private.h"
+#include "winsys/cogl-winsys-stub-private.h"
+#include "deprecated/cogl-clutter.h"
 
 CoglBool
 cogl_clutter_check_extension (const char *name, const char *ext)
diff --git a/cogl/cogl/deprecated/cogl-material-compat.c b/cogl/cogl/deprecated/cogl-material-compat.c
index e4006ca71..cf096623a 100644
--- a/cogl/cogl/deprecated/cogl-material-compat.c
+++ b/cogl/cogl/deprecated/cogl-material-compat.c
@@ -31,12 +31,12 @@
 
 #include "cogl-config.h"
 
-#include <cogl-material-compat.h>
 #include <cogl-pipeline.h>
 #include <cogl-pipeline-private.h>
 #include <cogl-types.h>
 #include <cogl-matrix.h>
 #include <cogl-context-private.h>
+#include <deprecated/cogl-material-compat.h>
 
 G_DEFINE_BOXED_TYPE (CoglMaterial, cogl_material,
                      cogl_object_ref, cogl_object_unref)
diff --git a/cogl/cogl/deprecated/cogl-program.c b/cogl/cogl/deprecated/cogl-program.c
index 0df1ccce0..d501a4517 100644
--- a/cogl/cogl/deprecated/cogl-program.c
+++ b/cogl/cogl/deprecated/cogl-program.c
@@ -31,12 +31,12 @@
 #include "cogl-config.h"
 
 #include "cogl-util.h"
-#include "cogl-util-gl-private.h"
+#include "driver/gl/cogl-util-gl-private.h"
 #include "cogl-context-private.h"
 #include "cogl-object-private.h"
 
-#include "cogl-shader-private.h"
-#include "cogl-program-private.h"
+#include "deprecated/cogl-shader-private.h"
+#include "deprecated/cogl-program-private.h"
 
 #include <string.h>
 
diff --git a/cogl/cogl/deprecated/cogl-shader.c b/cogl/cogl/deprecated/cogl-shader.c
index f57fee232..fbec7486b 100644
--- a/cogl/cogl/deprecated/cogl-shader.c
+++ b/cogl/cogl/deprecated/cogl-shader.c
@@ -30,12 +30,12 @@
 
 #include "cogl-config.h"
 
-#include "cogl-shader-private.h"
-#include "cogl-util-gl-private.h"
 #include "cogl-context-private.h"
 #include "cogl-object-private.h"
 #include "cogl-glsl-shader-private.h"
 #include "cogl-glsl-shader-boilerplate.h"
+#include "driver/gl/cogl-util-gl-private.h"
+#include "deprecated/cogl-shader-private.h"
 
 #include <glib.h>
 
diff --git a/cogl/cogl/deprecated/cogl-vertex-buffer.c b/cogl/cogl/deprecated/cogl-vertex-buffer.c
index 57325a677..a853faf34 100644
--- a/cogl/cogl/deprecated/cogl-vertex-buffer.c
+++ b/cogl/cogl/deprecated/cogl-vertex-buffer.c
@@ -104,7 +104,6 @@
 #include "cogl-util.h"
 #include "cogl-context-private.h"
 #include "cogl-object-private.h"
-#include "cogl-vertex-buffer-private.h"
 #include "cogl-texture-private.h"
 #include "cogl-pipeline.h"
 #include "cogl-pipeline-private.h"
@@ -114,6 +113,7 @@
 #include "cogl-journal-private.h"
 #include "cogl1-context.h"
 #include "cogl-vertex-buffer.h"
+#include "deprecated/cogl-vertex-buffer-private.h"
 
 #define PAD_FOR_ALIGNMENT(VAR, TYPE_SIZE) \
   (VAR = TYPE_SIZE + ((VAR - 1) & ~(TYPE_SIZE - 1)))
diff --git a/cogl/cogl/driver/gl/cogl-attribute-gl.c b/cogl/cogl/driver/gl/cogl-attribute-gl.c
index caf62c56f..9d0f0f77c 100644
--- a/cogl/cogl/driver/gl/cogl-attribute-gl.c
+++ b/cogl/cogl/driver/gl/cogl-attribute-gl.c
@@ -37,15 +37,15 @@
 #include <string.h>
 
 #include "cogl-private.h"
-#include "cogl-util-gl-private.h"
-#include "cogl-pipeline-opengl-private.h"
 #include "cogl-error-private.h"
 #include "cogl-context-private.h"
 #include "cogl-attribute.h"
 #include "cogl-attribute-private.h"
-#include "cogl-attribute-gl-private.h"
-#include "cogl-pipeline-progend-glsl-private.h"
-#include "cogl-buffer-gl-private.h"
+#include "driver/gl/cogl-attribute-gl-private.h"
+#include "driver/gl/cogl-buffer-gl-private.h"
+#include "driver/gl/cogl-pipeline-opengl-private.h"
+#include "driver/gl/cogl-pipeline-progend-glsl-private.h"
+#include "driver/gl/cogl-util-gl-private.h"
 
 typedef struct _ForeachChangedBitState
 {
diff --git a/cogl/cogl/driver/gl/cogl-buffer-gl.c b/cogl/cogl/driver/gl/cogl-buffer-gl.c
index c652c8c42..6f542d5dd 100644
--- a/cogl/cogl/driver/gl/cogl-buffer-gl.c
+++ b/cogl/cogl/driver/gl/cogl-buffer-gl.c
@@ -35,9 +35,9 @@
 #include "cogl-config.h"
 
 #include "cogl-context-private.h"
-#include "cogl-buffer-gl-private.h"
+#include "driver/gl/cogl-buffer-gl-private.h"
 #include "cogl-error-private.h"
-#include "cogl-util-gl-private.h"
+#include "driver/gl/cogl-util-gl-private.h"
 
 /*
  * GL/GLES compatibility defines for the buffer API:
diff --git a/cogl/cogl/driver/gl/cogl-clip-stack-gl.c b/cogl/cogl/driver/gl/cogl-clip-stack-gl.c
index 8f494bedf..dc7020254 100644
--- a/cogl/cogl/driver/gl/cogl-clip-stack-gl.c
+++ b/cogl/cogl/driver/gl/cogl-clip-stack-gl.c
@@ -35,11 +35,11 @@
 #include "cogl-config.h"
 
 #include "cogl-context-private.h"
-#include "cogl-util-gl-private.h"
 #include "cogl-primitives-private.h"
-#include "cogl-pipeline-opengl-private.h"
-#include "cogl-clip-stack-gl-private.h"
 #include "cogl-primitive-private.h"
+#include "driver/gl/cogl-util-gl-private.h"
+#include "driver/gl/cogl-pipeline-opengl-private.h"
+#include "driver/gl/cogl-clip-stack-gl-private.h"
 
 #ifndef GL_CLIP_PLANE0
 #define GL_CLIP_PLANE0 0x3000
diff --git a/cogl/cogl/driver/gl/cogl-framebuffer-gl.c b/cogl/cogl/driver/gl/cogl-framebuffer-gl.c
index cb23408d7..e6979a608 100644
--- a/cogl/cogl/driver/gl/cogl-framebuffer-gl.c
+++ b/cogl/cogl/driver/gl/cogl-framebuffer-gl.c
@@ -31,13 +31,13 @@
 #include "cogl-config.h"
 
 #include "cogl-context-private.h"
-#include "cogl-util-gl-private.h"
 #include "cogl-framebuffer-private.h"
-#include "cogl-framebuffer-gl-private.h"
-#include "cogl-buffer-gl-private.h"
 #include "cogl-error-private.h"
-#include "cogl-texture-gl-private.h"
 #include "cogl-texture-private.h"
+#include "driver/gl/cogl-util-gl-private.h"
+#include "driver/gl/cogl-framebuffer-gl-private.h"
+#include "driver/gl/cogl-buffer-gl-private.h"
+#include "driver/gl/cogl-texture-gl-private.h"
 
 #include <glib.h>
 #include <string.h>
diff --git a/cogl/cogl/driver/gl/cogl-pipeline-fragend-glsl.c 
b/cogl/cogl/driver/gl/cogl-pipeline-fragend-glsl.c
index 52d89825e..efedc33c5 100644
--- a/cogl/cogl/driver/gl/cogl-pipeline-fragend-glsl.c
+++ b/cogl/cogl/driver/gl/cogl-pipeline-fragend-glsl.c
@@ -37,22 +37,22 @@
 #include <string.h>
 
 #include "cogl-context-private.h"
-#include "cogl-util-gl-private.h"
 #include "cogl-pipeline-private.h"
 #include "cogl-pipeline-layer-private.h"
 #include "cogl-blend-string.h"
 #include "cogl-snippet-private.h"
 #include "cogl-list.h"
+#include "driver/gl/cogl-util-gl-private.h"
 
 #ifdef COGL_PIPELINE_FRAGEND_GLSL
 
 #include "cogl-context-private.h"
 #include "cogl-object-private.h"
-#include "cogl-shader-private.h"
-#include "cogl-program-private.h"
 #include "cogl-pipeline-cache.h"
-#include "cogl-pipeline-fragend-glsl-private.h"
 #include "cogl-glsl-shader-private.h"
+#include "driver/gl/cogl-pipeline-fragend-glsl-private.h"
+#include "deprecated/cogl-shader-private.h"
+#include "deprecated/cogl-program-private.h"
 
 #include <glib.h>
 
diff --git a/cogl/cogl/driver/gl/cogl-pipeline-opengl.c b/cogl/cogl/driver/gl/cogl-pipeline-opengl.c
index f15706813..0e8f7c698 100644
--- a/cogl/cogl/driver/gl/cogl-pipeline-opengl.c
+++ b/cogl/cogl/driver/gl/cogl-pipeline-opengl.c
@@ -34,16 +34,16 @@
 #include "cogl-config.h"
 
 #include "cogl-debug.h"
-#include "cogl-util-gl-private.h"
-#include "cogl-pipeline-opengl-private.h"
 #include "cogl-pipeline-private.h"
 #include "cogl-context-private.h"
 #include "cogl-texture-private.h"
 #include "cogl-framebuffer-private.h"
 #include "cogl-offscreen.h"
-#include "cogl-texture-gl-private.h"
+#include "driver/gl/cogl-util-gl-private.h"
+#include "driver/gl/cogl-pipeline-opengl-private.h"
+#include "driver/gl/cogl-texture-gl-private.h"
 
-#include "cogl-pipeline-progend-glsl-private.h"
+#include "driver/gl/cogl-pipeline-progend-glsl-private.h"
 
 #include <test-fixtures/test-unit.h>
 
diff --git a/cogl/cogl/driver/gl/cogl-pipeline-progend-glsl.c 
b/cogl/cogl/driver/gl/cogl-pipeline-progend-glsl.c
index 69426dd44..241fbae7f 100644
--- a/cogl/cogl/driver/gl/cogl-pipeline-progend-glsl.c
+++ b/cogl/cogl/driver/gl/cogl-pipeline-progend-glsl.c
@@ -37,23 +37,23 @@
 
 #include "cogl-util.h"
 #include "cogl-context-private.h"
-#include "cogl-util-gl-private.h"
 #include "cogl-pipeline-private.h"
-#include "cogl-pipeline-opengl-private.h"
 #include "cogl-offscreen.h"
+#include "driver/gl/cogl-util-gl-private.h"
+#include "driver/gl/cogl-pipeline-opengl-private.h"
 
 #ifdef COGL_PIPELINE_PROGEND_GLSL
 
 #include "cogl-context-private.h"
 #include "cogl-object-private.h"
-#include "cogl-program-private.h"
-#include "cogl-pipeline-fragend-glsl-private.h"
-#include "cogl-pipeline-vertend-glsl-private.h"
 #include "cogl-pipeline-cache.h"
 #include "cogl-pipeline-state-private.h"
 #include "cogl-attribute-private.h"
 #include "cogl-framebuffer-private.h"
-#include "cogl-pipeline-progend-glsl-private.h"
+#include "driver/gl/cogl-pipeline-fragend-glsl-private.h"
+#include "driver/gl/cogl-pipeline-vertend-glsl-private.h"
+#include "driver/gl/cogl-pipeline-progend-glsl-private.h"
+#include "deprecated/cogl-program-private.h"
 
 /* These are used to generalise updating some uniforms that are
    required when building for drivers missing some fixed function
diff --git a/cogl/cogl/driver/gl/cogl-pipeline-vertend-glsl.c 
b/cogl/cogl/driver/gl/cogl-pipeline-vertend-glsl.c
index 772d018f6..2374c77d5 100644
--- a/cogl/cogl/driver/gl/cogl-pipeline-vertend-glsl.c
+++ b/cogl/cogl/driver/gl/cogl-pipeline-vertend-glsl.c
@@ -38,18 +38,18 @@
 #include <test-fixtures/test-unit.h>
 
 #include "cogl-context-private.h"
-#include "cogl-util-gl-private.h"
 #include "cogl-pipeline-private.h"
-#include "cogl-pipeline-opengl-private.h"
+#include "driver/gl/cogl-util-gl-private.h"
+#include "driver/gl/cogl-pipeline-opengl-private.h"
 
 #ifdef COGL_PIPELINE_VERTEND_GLSL
 
 #include "cogl-context-private.h"
 #include "cogl-object-private.h"
-#include "cogl-program-private.h"
-#include "cogl-pipeline-vertend-glsl-private.h"
 #include "cogl-pipeline-state-private.h"
 #include "cogl-glsl-shader-private.h"
+#include "driver/gl/cogl-pipeline-vertend-glsl-private.h"
+#include "deprecated/cogl-program-private.h"
 
 const CoglPipelineVertend _cogl_pipeline_glsl_vertend;
 
diff --git a/cogl/cogl/driver/gl/cogl-texture-2d-gl.c b/cogl/cogl/driver/gl/cogl-texture-2d-gl.c
index 218b6d5a9..56f8e34ef 100644
--- a/cogl/cogl/driver/gl/cogl-texture-2d-gl.c
+++ b/cogl/cogl/driver/gl/cogl-texture-2d-gl.c
@@ -39,12 +39,12 @@
 #include "cogl-private.h"
 #include "cogl-texture-private.h"
 #include "cogl-texture-2d-gl.h"
-#include "cogl-texture-2d-gl-private.h"
 #include "cogl-texture-2d-private.h"
-#include "cogl-texture-gl-private.h"
-#include "cogl-pipeline-opengl-private.h"
 #include "cogl-error-private.h"
-#include "cogl-util-gl-private.h"
+#include "driver/gl/cogl-texture-2d-gl-private.h"
+#include "driver/gl/cogl-texture-gl-private.h"
+#include "driver/gl/cogl-pipeline-opengl-private.h"
+#include "driver/gl/cogl-util-gl-private.h"
 
 #if defined (COGL_HAS_EGL_SUPPORT)
 
diff --git a/cogl/cogl/driver/gl/cogl-texture-gl.c b/cogl/cogl/driver/gl/cogl-texture-gl.c
index 81cf70df8..89308adaa 100644
--- a/cogl/cogl/driver/gl/cogl-texture-gl.c
+++ b/cogl/cogl/driver/gl/cogl-texture-gl.c
@@ -32,11 +32,11 @@
 #include <strings.h>
 
 #include "cogl-context-private.h"
-#include "cogl-util-gl-private.h"
-#include "cogl-texture-gl-private.h"
 #include "cogl-texture-3d-private.h"
 #include "cogl-util.h"
-#include "cogl-pipeline-opengl-private.h"
+#include "driver/gl/cogl-util-gl-private.h"
+#include "driver/gl/cogl-texture-gl-private.h"
+#include "driver/gl/cogl-pipeline-opengl-private.h"
 
 static inline int
 calculate_alignment (int rowstride)
diff --git a/cogl/cogl/driver/gl/cogl-util-gl.c b/cogl/cogl/driver/gl/cogl-util-gl.c
index 40f0a399f..759025b56 100644
--- a/cogl/cogl/driver/gl/cogl-util-gl.c
+++ b/cogl/cogl/driver/gl/cogl-util-gl.c
@@ -35,7 +35,7 @@
 #include "cogl-types.h"
 #include "cogl-context-private.h"
 #include "cogl-error-private.h"
-#include "cogl-util-gl-private.h"
+#include "driver/gl/cogl-util-gl-private.h"
 
 #ifdef COGL_GL_DEBUG
 /* GL error to string conversion */
diff --git a/cogl/cogl/driver/gl/gl/cogl-driver-gl.c b/cogl/cogl/driver/gl/gl/cogl-driver-gl.c
index 573b809cf..f7454aa07 100644
--- a/cogl/cogl/driver/gl/gl/cogl-driver-gl.c
+++ b/cogl/cogl/driver/gl/gl/cogl-driver-gl.c
@@ -34,15 +34,15 @@
 
 #include "cogl-private.h"
 #include "cogl-context-private.h"
-#include "cogl-util-gl-private.h"
 #include "cogl-feature-private.h"
 #include "cogl-renderer-private.h"
 #include "cogl-error-private.h"
-#include "cogl-framebuffer-gl-private.h"
-#include "cogl-texture-2d-gl-private.h"
-#include "cogl-attribute-gl-private.h"
-#include "cogl-clip-stack-gl-private.h"
-#include "cogl-buffer-gl-private.h"
+#include "driver/gl/cogl-util-gl-private.h"
+#include "driver/gl/cogl-framebuffer-gl-private.h"
+#include "driver/gl/cogl-texture-2d-gl-private.h"
+#include "driver/gl/cogl-attribute-gl-private.h"
+#include "driver/gl/cogl-clip-stack-gl-private.h"
+#include "driver/gl/cogl-buffer-gl-private.h"
 
 static CoglBool
 _cogl_driver_pixel_format_from_gl_internal (CoglContext *context,
diff --git a/cogl/cogl/driver/gl/gl/cogl-texture-driver-gl.c b/cogl/cogl/driver/gl/gl/cogl-texture-driver-gl.c
index b562c27d9..a3208a825 100644
--- a/cogl/cogl/driver/gl/gl/cogl-texture-driver-gl.c
+++ b/cogl/cogl/driver/gl/gl/cogl-texture-driver-gl.c
@@ -44,10 +44,10 @@
 #include "cogl-context-private.h"
 #include "cogl-object-private.h"
 #include "cogl-primitives.h"
-#include "cogl-pipeline-opengl-private.h"
-#include "cogl-util-gl-private.h"
 #include "cogl-error-private.h"
-#include "cogl-texture-gl-private.h"
+#include "driver/gl/cogl-pipeline-opengl-private.h"
+#include "driver/gl/cogl-util-gl-private.h"
+#include "driver/gl/cogl-texture-gl-private.h"
 
 #include <string.h>
 #include <stdlib.h>
diff --git a/cogl/cogl/driver/gl/gles/cogl-driver-gles.c b/cogl/cogl/driver/gl/gles/cogl-driver-gles.c
index e9486d958..cc20a0bd6 100644
--- a/cogl/cogl/driver/gl/gles/cogl-driver-gles.c
+++ b/cogl/cogl/driver/gl/gles/cogl-driver-gles.c
@@ -33,15 +33,15 @@
 #include <string.h>
 
 #include "cogl-context-private.h"
-#include "cogl-util-gl-private.h"
 #include "cogl-feature-private.h"
 #include "cogl-renderer-private.h"
 #include "cogl-private.h"
-#include "cogl-framebuffer-gl-private.h"
-#include "cogl-texture-2d-gl-private.h"
-#include "cogl-attribute-gl-private.h"
-#include "cogl-clip-stack-gl-private.h"
-#include "cogl-buffer-gl-private.h"
+#include "driver/gl/cogl-util-gl-private.h"
+#include "driver/gl/cogl-framebuffer-gl-private.h"
+#include "driver/gl/cogl-texture-2d-gl-private.h"
+#include "driver/gl/cogl-attribute-gl-private.h"
+#include "driver/gl/cogl-clip-stack-gl-private.h"
+#include "driver/gl/cogl-buffer-gl-private.h"
 
 #ifndef GL_UNSIGNED_INT_24_8
 #define GL_UNSIGNED_INT_24_8 0x84FA
diff --git a/cogl/cogl/driver/gl/gles/cogl-texture-driver-gles.c 
b/cogl/cogl/driver/gl/gles/cogl-texture-driver-gles.c
index a9d8a7b4f..01fd8c884 100644
--- a/cogl/cogl/driver/gl/gles/cogl-texture-driver-gles.c
+++ b/cogl/cogl/driver/gl/gles/cogl-texture-driver-gles.c
@@ -41,13 +41,13 @@
 #include "cogl-bitmap-private.h"
 #include "cogl-texture-private.h"
 #include "cogl-pipeline.h"
-#include "cogl-pipeline-opengl-private.h"
 #include "cogl-context-private.h"
 #include "cogl-object-private.h"
 #include "cogl-primitives.h"
-#include "cogl-util-gl-private.h"
 #include "cogl-error-private.h"
-#include "cogl-texture-gl-private.h"
+#include "driver/gl/cogl-pipeline-opengl-private.h"
+#include "driver/gl/cogl-util-gl-private.h"
+#include "driver/gl/cogl-texture-gl-private.h"
 
 #include <string.h>
 #include <stdlib.h>
diff --git a/cogl/cogl/winsys/cogl-texture-pixmap-x11.c b/cogl/cogl/winsys/cogl-texture-pixmap-x11.c
index 91e1f557e..18e328632 100644
--- a/cogl/cogl/winsys/cogl-texture-pixmap-x11.c
+++ b/cogl/cogl/winsys/cogl-texture-pixmap-x11.c
@@ -49,13 +49,13 @@
 #include "cogl-display-private.h"
 #include "cogl-renderer-private.h"
 #include "cogl-object-private.h"
-#include "cogl-winsys-private.h"
-#include "cogl-pipeline-opengl-private.h"
 #include "cogl-xlib.h"
 #include "cogl-error-private.h"
-#include "cogl-texture-gl-private.h"
 #include "cogl-private.h"
 #include "cogl-gtype-private.h"
+#include "driver/gl/cogl-pipeline-opengl-private.h"
+#include "driver/gl/cogl-texture-gl-private.h"
+#include "winsys/cogl-winsys-private.h"
 
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
diff --git a/cogl/cogl/winsys/cogl-winsys-egl-private.h b/cogl/cogl/winsys/cogl-winsys-egl-private.h
index 1db2cd481..d8adfc8d0 100644
--- a/cogl/cogl/winsys/cogl-winsys-egl-private.h
+++ b/cogl/cogl/winsys/cogl-winsys-egl-private.h
@@ -32,10 +32,10 @@
 #define __COGL_WINSYS_EGL_PRIVATE_H
 
 #include "cogl-defines.h"
-#include "cogl-winsys-private.h"
 #include "cogl-context.h"
 #include "cogl-context-private.h"
 #include "cogl-framebuffer-private.h"
+#include "winsys/cogl-winsys-private.h"
 
 /* XXX: depending on what version of Mesa you have then
  * eglQueryWaylandBuffer may take a wl_buffer or wl_resource argument
@@ -132,7 +132,7 @@ typedef struct _CoglRendererEGL
 
 #define COGL_WINSYS_FEATURE_END()
 
-#include "cogl-winsys-egl-feature-functions.h"
+#include "winsys/cogl-winsys-egl-feature-functions.h"
 
 #undef COGL_WINSYS_FEATURE_BEGIN
 #undef COGL_WINSYS_FEATURE_FUNCTION
diff --git a/cogl/cogl/winsys/cogl-winsys-egl-x11-private.h b/cogl/cogl/winsys/cogl-winsys-egl-x11-private.h
index 206d4850d..21562dd01 100644
--- a/cogl/cogl/winsys/cogl-winsys-egl-x11-private.h
+++ b/cogl/cogl/winsys/cogl-winsys-egl-x11-private.h
@@ -31,7 +31,7 @@
 #ifndef __COGL_WINSYS_EGL_X11_PRIVATE_H
 #define __COGL_WINSYS_EGL_X11_PRIVATE_H
 
-#include "cogl-winsys-private.h"
+#include "winsys/cogl-winsys-private.h"
 
 const CoglWinsysVtable *
 _cogl_winsys_egl_xlib_get_vtable (void);
diff --git a/cogl/cogl/winsys/cogl-winsys-egl-x11.c b/cogl/cogl/winsys/cogl-winsys-egl-x11.c
index eae080006..803ace524 100644
--- a/cogl/cogl/winsys/cogl-winsys-egl-x11.c
+++ b/cogl/cogl/winsys/cogl-winsys-egl-x11.c
@@ -35,20 +35,19 @@
 
 #include <X11/Xlib.h>
 
-#include "cogl-winsys-egl-x11-private.h"
-#include "cogl-winsys-egl-private.h"
 #include "cogl-xlib-renderer-private.h"
 #include "cogl-xlib-renderer.h"
 #include "cogl-framebuffer-private.h"
 #include "cogl-onscreen-private.h"
 #include "cogl-display-private.h"
 #include "cogl-renderer-private.h"
-
 #include "cogl-texture-pixmap-x11-private.h"
 #include "cogl-texture-2d-private.h"
 #include "cogl-texture-2d.h"
 #include "cogl-error-private.h"
 #include "cogl-poll-private.h"
+#include "winsys/cogl-winsys-egl-x11-private.h"
+#include "winsys/cogl-winsys-egl-private.h"
 
 #define COGL_ONSCREEN_X11_EVENT_MASK (StructureNotifyMask | ExposureMask)
 
diff --git a/cogl/cogl/winsys/cogl-winsys-egl.c b/cogl/cogl/winsys/cogl-winsys-egl.c
index 7a6a70966..6e43d2227 100644
--- a/cogl/cogl/winsys/cogl-winsys-egl.c
+++ b/cogl/cogl/winsys/cogl-winsys-egl.c
@@ -34,8 +34,6 @@
 
 #include "cogl-i18n-private.h"
 #include "cogl-util.h"
-#include "cogl-winsys-egl-private.h"
-#include "cogl-winsys-private.h"
 #include "cogl-feature-private.h"
 #include "cogl-context-private.h"
 #include "cogl-framebuffer.h"
@@ -46,8 +44,9 @@
 #include "cogl-gles2-context-private.h"
 #include "cogl-error-private.h"
 #include "cogl-egl.h"
-
 #include "cogl-private.h"
+#include "winsys/cogl-winsys-egl-private.h"
+#include "winsys/cogl-winsys-private.h"
 
 #include <stdlib.h>
 #include <stdio.h>
@@ -86,7 +85,7 @@
 #define COGL_WINSYS_FEATURE_END()               \
   { NULL, 0 },                                  \
     };
-#include "cogl-winsys-egl-feature-functions.h"
+#include "winsys/cogl-winsys-egl-feature-functions.h"
 
 /* Define an array of features */
 #undef COGL_WINSYS_FEATURE_BEGIN
@@ -103,7 +102,7 @@
 
 static const CoglFeatureData winsys_feature_data[] =
   {
-#include "cogl-winsys-egl-feature-functions.h"
+#include "winsys/cogl-winsys-egl-feature-functions.h"
   };
 
 static const char *
diff --git a/cogl/cogl/winsys/cogl-winsys-glx.c b/cogl/cogl/winsys/cogl-winsys-glx.c
index fb2374c35..2226ee942 100644
--- a/cogl/cogl/winsys/cogl-winsys-glx.c
+++ b/cogl/cogl/winsys/cogl-winsys-glx.c
@@ -34,7 +34,6 @@
 
 #include "cogl-i18n-private.h"
 #include "cogl-util.h"
-#include "cogl-winsys-private.h"
 #include "cogl-feature-private.h"
 #include "cogl-context-private.h"
 #include "cogl-framebuffer.h"
@@ -46,18 +45,19 @@
 #include "cogl-private.h"
 #include "cogl-texture-2d-private.h"
 #include "cogl-texture-rectangle-private.h"
-#include "cogl-pipeline-opengl-private.h"
 #include "cogl-frame-info-private.h"
 #include "cogl-framebuffer-private.h"
 #include "cogl-onscreen-private.h"
 #include "cogl-swap-chain-private.h"
 #include "cogl-xlib-renderer.h"
 #include "cogl-util.h"
-#include "cogl-winsys-glx-private.h"
 #include "cogl-error-private.h"
 #include "cogl-poll-private.h"
 #include "cogl-version.h"
 #include "cogl-glx.h"
+#include "driver/gl/cogl-pipeline-opengl-private.h"
+#include "winsys/cogl-winsys-private.h"
+#include "winsys/cogl-winsys-glx-private.h"
 
 #include <stdlib.h>
 #include <sys/types.h>
@@ -142,7 +142,7 @@ typedef struct _CoglTexturePixmapGLX
 #define COGL_WINSYS_FEATURE_END()               \
   { NULL, 0 },                                  \
     };
-#include "cogl-winsys-glx-feature-functions.h"
+#include "winsys/cogl-winsys-glx-feature-functions.h"
 
 /* Define an array of features */
 #undef COGL_WINSYS_FEATURE_BEGIN
@@ -163,7 +163,7 @@ typedef struct _CoglTexturePixmapGLX
 
 static const CoglFeatureData winsys_feature_data[] =
   {
-#include "cogl-winsys-glx-feature-functions.h"
+#include "winsys/cogl-winsys-glx-feature-functions.h"
   };
 
 static CoglFuncPtr
diff --git a/cogl/cogl/winsys/cogl-winsys-stub.c b/cogl/cogl/winsys/cogl-winsys-stub.c
index 87f36cc32..29c4cf8c9 100644
--- a/cogl/cogl/winsys/cogl-winsys-stub.c
+++ b/cogl/cogl/winsys/cogl-winsys-stub.c
@@ -38,7 +38,7 @@
 #include "cogl-context-private.h"
 #include "cogl-framebuffer-private.h"
 #include "cogl-private.h"
-#include "cogl-winsys-stub-private.h"
+#include "winsys/cogl-winsys-stub-private.h"
 
 #include <string.h>
 


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