Move GL-specific include files to their own subdirectory, to better
coexist alongside D3D backend.
Requires gyp change.
http://codereview.appspot.com/5665045/
git-svn-id: http://skia.googlecode.com/svn/trunk@3185 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/bench/BenchGpuTimer_gl.cpp b/bench/BenchGpuTimer_gl.cpp
index 885f7b2..b7bd88b 100644
--- a/bench/BenchGpuTimer_gl.cpp
+++ b/bench/BenchGpuTimer_gl.cpp
@@ -6,7 +6,7 @@
* found in the LICENSE file.
*/
#include "BenchGpuTimer_gl.h"
-#include "SkGLContext.h"
+#include "gl/SkGLContext.h"
BenchGpuTimer::BenchGpuTimer(const SkGLContext* glctx) {
fContext = glctx;
diff --git a/bench/benchmain.cpp b/bench/benchmain.cpp
index 024ad0f..7732268 100644
--- a/bench/benchmain.cpp
+++ b/bench/benchmain.cpp
@@ -18,8 +18,8 @@
#include "SkGpuDevice.h"
#include "SkGraphics.h"
#include "SkImageEncoder.h"
-#include "SkNativeGLContext.h"
-#include "SkNullGLContext.h"
+#include "gl/SkNativeGLContext.h"
+#include "gl/SkNullGLContext.h"
#include "SkNWayCanvas.h"
#include "SkPicture.h"
#include "SkString.h"
diff --git a/gm/gmmain.cpp b/gm/gmmain.cpp
index 3958998..523faf8 100644
--- a/gm/gmmain.cpp
+++ b/gm/gmmain.cpp
@@ -19,8 +19,8 @@
#include "SkGraphics.h"
#include "SkImageDecoder.h"
#include "SkImageEncoder.h"
-#include "SkNativeGLContext.h"
-#include "SkMesaGLContext.h"
+#include "gl/SkNativeGLContext.h"
+#include "gl/SkMesaGLContext.h"
#include "SkPicture.h"
#include "SkStream.h"
#include "SkRefCnt.h"
diff --git a/gyp/gpu.gyp b/gyp/gpu.gyp
index 37cc4c0..39e0ee9 100644
--- a/gyp/gpu.gyp
+++ b/gyp/gpu.gyp
@@ -106,10 +106,10 @@
'../include/gpu/SkGr.h',
'../include/gpu/SkGrTexturePixelRef.h',
- '../include/gpu/SkGLContext.h',
- '../include/gpu/SkMesaGLContext.h',
- '../include/gpu/SkNativeGLContext.h',
- '../include/gpu/SkNullGLContext.h',
+ '../include/gpu/gl/SkGLContext.h',
+ '../include/gpu/gl/SkMesaGLContext.h',
+ '../include/gpu/gl/SkNativeGLContext.h',
+ '../include/gpu/gl/SkNullGLContext.h',
'../src/gpu/GrPrintf_skia.cpp',
'../src/gpu/SkGpuCanvas.cpp',
@@ -182,10 +182,10 @@
'../include/gpu/GrTypes.h',
'../include/gpu/GrUserConfig.h',
- '../include/gpu/GrGLConfig.h',
- '../include/gpu/GrGLConfig_chrome.h',
- '../include/gpu/GrGLDefines.h',
- '../include/gpu/GrGLInterface.h',
+ '../include/gpu/gl/GrGLConfig.h',
+ '../include/gpu/gl/GrGLConfig_chrome.h',
+ '../include/gpu/gl/GrGLDefines.h',
+ '../include/gpu/gl/GrGLInterface.h',
'../src/gpu/GrAAHairLinePathRenderer.cpp',
'../src/gpu/GrAAHairLinePathRenderer.h',
diff --git a/include/gpu/GrGLConfig.h b/include/gpu/gl/GrGLConfig.h
similarity index 100%
rename from include/gpu/GrGLConfig.h
rename to include/gpu/gl/GrGLConfig.h
diff --git a/include/gpu/GrGLConfig_chrome.h b/include/gpu/gl/GrGLConfig_chrome.h
similarity index 100%
rename from include/gpu/GrGLConfig_chrome.h
rename to include/gpu/gl/GrGLConfig_chrome.h
diff --git a/include/gpu/GrGLDefines.h b/include/gpu/gl/GrGLDefines.h
similarity index 100%
rename from include/gpu/GrGLDefines.h
rename to include/gpu/gl/GrGLDefines.h
diff --git a/include/gpu/GrGLInterface.h b/include/gpu/gl/GrGLInterface.h
similarity index 100%
rename from include/gpu/GrGLInterface.h
rename to include/gpu/gl/GrGLInterface.h
diff --git a/include/gpu/SkGLContext.h b/include/gpu/gl/SkGLContext.h
similarity index 100%
rename from include/gpu/SkGLContext.h
rename to include/gpu/gl/SkGLContext.h
diff --git a/include/gpu/SkMesaGLContext.h b/include/gpu/gl/SkMesaGLContext.h
similarity index 100%
rename from include/gpu/SkMesaGLContext.h
rename to include/gpu/gl/SkMesaGLContext.h
diff --git a/include/gpu/SkNativeGLContext.h b/include/gpu/gl/SkNativeGLContext.h
similarity index 100%
rename from include/gpu/SkNativeGLContext.h
rename to include/gpu/gl/SkNativeGLContext.h
diff --git a/include/gpu/SkNullGLContext.h b/include/gpu/gl/SkNullGLContext.h
similarity index 100%
rename from include/gpu/SkNullGLContext.h
rename to include/gpu/gl/SkNullGLContext.h
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp
index 898bda0..d40a670 100644
--- a/samplecode/SampleApp.cpp
+++ b/samplecode/SampleApp.cpp
@@ -22,7 +22,7 @@
#include "GrContext.h"
#include "SkTypeface.h"
-#include "GrGLInterface.h"
+#include "gl/GrGLInterface.h"
#include "GrRenderTarget.h"
#include "SkPDFDevice.h"
diff --git a/src/gpu/GrGpuFactory.cpp b/src/gpu/GrGpuFactory.cpp
index 7d0678e..585f35f 100644
--- a/src/gpu/GrGpuFactory.cpp
+++ b/src/gpu/GrGpuFactory.cpp
@@ -14,7 +14,7 @@
// #include "GrGpuD3D9.h"
#endif
-#include "GrGLConfig.h"
+#include "gl/GrGLConfig.h"
#include "GrGpu.h"
#include "gl/GrGpuGLShaders.h"
diff --git a/src/gpu/GrGpuVertex.h b/src/gpu/GrGpuVertex.h
index 2abc2f4..d093e2d 100644
--- a/src/gpu/GrGpuVertex.h
+++ b/src/gpu/GrGpuVertex.h
@@ -11,7 +11,7 @@
#ifndef GrGpuVertex_DEFINED
#define GrGpuVertex_DEFINED
-#include "GrGLConfig.h"
+#include "gl/GrGLConfig.h"
#include "GrPoint.h"
#if GR_TEXT_SCALAR_IS_USHORT
diff --git a/src/gpu/gl/GrGLContextInfo.h b/src/gpu/gl/GrGLContextInfo.h
index b753608..c37b11d 100644
--- a/src/gpu/gl/GrGLContextInfo.h
+++ b/src/gpu/gl/GrGLContextInfo.h
@@ -1,4 +1,3 @@
-
/*
* Copyright 2012 Google Inc.
*
@@ -11,7 +10,7 @@
#define GrGLContextInfo_DEFINED
#include "GrGLCaps.h"
-#include "GrGLInterface.h"
+#include "gl/GrGLInterface.h"
#include "GrGLSL.h"
#include "SkString.h"
diff --git a/src/gpu/gl/GrGLCreateNullInterface.cpp b/src/gpu/gl/GrGLCreateNullInterface.cpp
index cdac75f..5095079 100644
--- a/src/gpu/gl/GrGLCreateNullInterface.cpp
+++ b/src/gpu/gl/GrGLCreateNullInterface.cpp
@@ -7,7 +7,7 @@
*/
-#include "GrGLInterface.h"
+#include "gl/GrGLInterface.h"
#include "../GrTDArray.h"
GrGLvoid GR_GL_FUNCTION_TYPE nullGLActiveTexture(GrGLenum texture) {}
diff --git a/src/gpu/gl/GrGLDefaultInterface_native.cpp b/src/gpu/gl/GrGLDefaultInterface_native.cpp
index 7b8b84a..13988c0 100644
--- a/src/gpu/gl/GrGLDefaultInterface_native.cpp
+++ b/src/gpu/gl/GrGLDefaultInterface_native.cpp
@@ -6,7 +6,7 @@
* found in the LICENSE file.
*/
-#include "GrGLInterface.h"
+#include "gl/GrGLInterface.h"
const GrGLInterface* GrGLDefaultInterface() {
return GrGLCreateNativeInterface();
diff --git a/src/gpu/gl/GrGLIRect.h b/src/gpu/gl/GrGLIRect.h
index e94fa21..aee5fb4 100644
--- a/src/gpu/gl/GrGLIRect.h
+++ b/src/gpu/gl/GrGLIRect.h
@@ -11,7 +11,7 @@
#ifndef GrGLIRect_DEFINED
#define GrGLIRect_DEFINED
-#include "GrGLInterface.h"
+#include "gl/GrGLInterface.h"
/**
* Helper struct for dealing with the fact that Ganesh and GL use different
diff --git a/src/gpu/gl/GrGLIndexBuffer.h b/src/gpu/gl/GrGLIndexBuffer.h
index 9f32890..68c165f 100644
--- a/src/gpu/gl/GrGLIndexBuffer.h
+++ b/src/gpu/gl/GrGLIndexBuffer.h
@@ -12,7 +12,7 @@
#define GrGLIndexBuffer_DEFINED
#include "../GrIndexBuffer.h"
-#include "GrGLInterface.h"
+#include "gl/GrGLInterface.h"
class GrGpuGL;
diff --git a/src/gpu/gl/GrGLInterface.cpp b/src/gpu/gl/GrGLInterface.cpp
index c1ac088..7fb871c 100644
--- a/src/gpu/gl/GrGLInterface.cpp
+++ b/src/gpu/gl/GrGLInterface.cpp
@@ -8,8 +8,8 @@
#include "GrTypes.h"
-#include "GrGLInterface.h"
-#include "GrGLDefines.h"
+#include "gl/GrGLInterface.h"
+#include "gl/GrGLDefines.h"
#include <stdio.h>
diff --git a/src/gpu/gl/GrGLSL.h b/src/gpu/gl/GrGLSL.h
index 5b9c5b6..a3d3921 100644
--- a/src/gpu/gl/GrGLSL.h
+++ b/src/gpu/gl/GrGLSL.h
@@ -8,7 +8,7 @@
#ifndef GrGLSL_DEFINED
#define GrGLSL_DEFINED
-#include "GrGLInterface.h"
+#include "gl/GrGLInterface.h"
class GrGLShaderVar;
diff --git a/src/gpu/gl/GrGLStencilBuffer.h b/src/gpu/gl/GrGLStencilBuffer.h
index 0995c7d..908921a 100644
--- a/src/gpu/gl/GrGLStencilBuffer.h
+++ b/src/gpu/gl/GrGLStencilBuffer.h
@@ -10,7 +10,7 @@
#ifndef GrGLStencilBuffer_DEFINED
#define GrGLStencilBuffer_DEFINED
-#include "GrGLInterface.h"
+#include "gl/GrGLInterface.h"
#include "../GrStencilBuffer.h"
class GrGLStencilBuffer : public GrStencilBuffer {
diff --git a/src/gpu/gl/GrGLUtil.cpp b/src/gpu/gl/GrGLUtil.cpp
index f12b407..23ed5b4 100644
--- a/src/gpu/gl/GrGLUtil.cpp
+++ b/src/gpu/gl/GrGLUtil.cpp
@@ -7,8 +7,8 @@
*/
-#include "GrGLConfig.h"
-#include "GrGLInterface.h"
+#include "gl/GrGLConfig.h"
+#include "gl/GrGLInterface.h"
void GrGLClearErr(const GrGLInterface* gl) {
while (GR_GL_NO_ERROR != gl->fGetError()) {}
diff --git a/src/gpu/gl/GrGLVertexBuffer.h b/src/gpu/gl/GrGLVertexBuffer.h
index ff03d7a..5d2ba30 100644
--- a/src/gpu/gl/GrGLVertexBuffer.h
+++ b/src/gpu/gl/GrGLVertexBuffer.h
@@ -12,7 +12,7 @@
#define GrGLVertexBuffer_DEFINED
#include "../GrVertexBuffer.h"
-#include "GrGLInterface.h"
+#include "gl/GrGLInterface.h"
class GrGpuGL;
diff --git a/src/gpu/gl/SkGLContext.cpp b/src/gpu/gl/SkGLContext.cpp
index 6142d3c..525afe8 100644
--- a/src/gpu/gl/SkGLContext.cpp
+++ b/src/gpu/gl/SkGLContext.cpp
@@ -5,7 +5,7 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#include "SkGLContext.h"
+#include "gl/SkGLContext.h"
SkGLContext::SkGLContext()
: fFBO(0)
diff --git a/src/gpu/gl/SkNullGLContext.cpp b/src/gpu/gl/SkNullGLContext.cpp
index 04e63d8..86c09b2 100644
--- a/src/gpu/gl/SkNullGLContext.cpp
+++ b/src/gpu/gl/SkNullGLContext.cpp
@@ -6,7 +6,7 @@
* found in the LICENSE file.
*/
-#include "SkNullGLContext.h"
+#include "gl/SkNullGLContext.h"
const GrGLInterface* SkNullGLContext::createGLContext() {
return GrGLCreateNullInterface();
diff --git a/src/gpu/unix/GrGLCreateNativeInterface_unix.cpp b/src/gpu/unix/GrGLCreateNativeInterface_unix.cpp
index ab0d351..1e9f2e0 100644
--- a/src/gpu/unix/GrGLCreateNativeInterface_unix.cpp
+++ b/src/gpu/unix/GrGLCreateNativeInterface_unix.cpp
@@ -7,7 +7,7 @@
*/
-#include "GrGLInterface.h"
+#include "gl/GrGLInterface.h"
#include <GL/glx.h>
#include <GL/gl.h>
diff --git a/src/gpu/unix/SkNativeGLContext_unix.cpp b/src/gpu/unix/SkNativeGLContext_unix.cpp
index 907e2b8..f4199eb 100644
--- a/src/gpu/unix/SkNativeGLContext_unix.cpp
+++ b/src/gpu/unix/SkNativeGLContext_unix.cpp
@@ -5,7 +5,7 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#include "SkNativeGLContext.h"
+#include "gl/SkNativeGLContext.h"
#include <GL/glu.h>
diff --git a/tests/GLInterfaceValidation.cpp b/tests/GLInterfaceValidation.cpp
index 2557c4c..5cee0e4 100755
--- a/tests/GLInterfaceValidation.cpp
+++ b/tests/GLInterfaceValidation.cpp
@@ -7,8 +7,8 @@
*/
#include "Test.h"
-#include "SkNativeGLContext.h"
-#include "SkMesaGLContext.h"
+#include "gl/SkNativeGLContext.h"
+#include "gl/SkMesaGLContext.h"
static void GLInterfaceValidationTest(skiatest::Reporter* reporter) {
typedef const GrGLInterface* (*interfaceFactory)();
diff --git a/tests/Test.cpp b/tests/Test.cpp
index 1c3b691..62df731 100644
--- a/tests/Test.cpp
+++ b/tests/Test.cpp
@@ -8,7 +8,7 @@
#include "Test.h"
#include "GrContext.h"
-#include "SkNativeGLContext.h"
+#include "gl/SkNativeGLContext.h"
#include "SkTLazy.h"
using namespace skiatest;