Move GL-specific source code to make room for D3D back end.
git-svn-id: http://skia.googlecode.com/svn/trunk@3165 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
index 39960de..57769e9 100644
--- a/src/gpu/GrGpu.cpp
+++ b/src/gpu/GrGpu.cpp
@@ -14,7 +14,7 @@
#include "GrContext.h"
#include "GrIndexBuffer.h"
#include "GrPathRenderer.h"
-#include "GrGLStencilBuffer.h"
+#include "GrStencilBuffer.h"
#include "GrVertexBuffer.h"
// probably makes no sense for this to be less than a page
diff --git a/src/gpu/GrGpuFactory.cpp b/src/gpu/GrGpuFactory.cpp
index 7d53e79..7d0678e 100644
--- a/src/gpu/GrGpuFactory.cpp
+++ b/src/gpu/GrGpuFactory.cpp
@@ -17,7 +17,7 @@
#include "GrGLConfig.h"
#include "GrGpu.h"
-#include "GrGpuGLShaders.h"
+#include "gl/GrGpuGLShaders.h"
GrGpu* GrGpu::Create(GrEngine engine, GrPlatform3DContext context3D) {
diff --git a/src/gpu/GrGLContextInfo.cpp b/src/gpu/gl/GrGLContextInfo.cpp
similarity index 100%
rename from src/gpu/GrGLContextInfo.cpp
rename to src/gpu/gl/GrGLContextInfo.cpp
diff --git a/src/gpu/GrGLContextInfo.h b/src/gpu/gl/GrGLContextInfo.h
similarity index 100%
rename from src/gpu/GrGLContextInfo.h
rename to src/gpu/gl/GrGLContextInfo.h
diff --git a/src/gpu/GrGLCreateNativeInterface_none.cpp b/src/gpu/gl/GrGLCreateNativeInterface_none.cpp
similarity index 100%
rename from src/gpu/GrGLCreateNativeInterface_none.cpp
rename to src/gpu/gl/GrGLCreateNativeInterface_none.cpp
diff --git a/src/gpu/GrGLCreateNullInterface.cpp b/src/gpu/gl/GrGLCreateNullInterface.cpp
similarity index 99%
rename from src/gpu/GrGLCreateNullInterface.cpp
rename to src/gpu/gl/GrGLCreateNullInterface.cpp
index d4a88c1..cdac75f 100644
--- a/src/gpu/GrGLCreateNullInterface.cpp
+++ b/src/gpu/gl/GrGLCreateNullInterface.cpp
@@ -8,6 +8,7 @@
#include "GrGLInterface.h"
+#include "../GrTDArray.h"
GrGLvoid GR_GL_FUNCTION_TYPE nullGLActiveTexture(GrGLenum texture) {}
GrGLvoid GR_GL_FUNCTION_TYPE nullGLAttachShader(GrGLuint program, GrGLuint shader) {}
@@ -124,7 +125,6 @@
// In debug builds we do asserts that ensure we agree with GL about when a buffer
// is mapped.
-#include "GrTDArray.h"
static GrTDArray<GrGLuint> gMappedBuffers;
static GrGLuint gCurrArrayBuffer;
static GrGLuint gCurrElementArrayBuffer;
diff --git a/src/gpu/GrGLDefaultInterface_native.cpp b/src/gpu/gl/GrGLDefaultInterface_native.cpp
similarity index 100%
rename from src/gpu/GrGLDefaultInterface_native.cpp
rename to src/gpu/gl/GrGLDefaultInterface_native.cpp
diff --git a/src/gpu/GrGLDefaultInterface_none.cpp b/src/gpu/gl/GrGLDefaultInterface_none.cpp
similarity index 100%
rename from src/gpu/GrGLDefaultInterface_none.cpp
rename to src/gpu/gl/GrGLDefaultInterface_none.cpp
diff --git a/src/gpu/GrGLIRect.h b/src/gpu/gl/GrGLIRect.h
similarity index 100%
rename from src/gpu/GrGLIRect.h
rename to src/gpu/gl/GrGLIRect.h
diff --git a/src/gpu/GrGLIndexBuffer.cpp b/src/gpu/gl/GrGLIndexBuffer.cpp
similarity index 100%
rename from src/gpu/GrGLIndexBuffer.cpp
rename to src/gpu/gl/GrGLIndexBuffer.cpp
diff --git a/src/gpu/GrGLIndexBuffer.h b/src/gpu/gl/GrGLIndexBuffer.h
similarity index 96%
rename from src/gpu/GrGLIndexBuffer.h
rename to src/gpu/gl/GrGLIndexBuffer.h
index c3e2287..9f32890 100644
--- a/src/gpu/GrGLIndexBuffer.h
+++ b/src/gpu/gl/GrGLIndexBuffer.h
@@ -11,7 +11,7 @@
#ifndef GrGLIndexBuffer_DEFINED
#define GrGLIndexBuffer_DEFINED
-#include "GrIndexBuffer.h"
+#include "../GrIndexBuffer.h"
#include "GrGLInterface.h"
class GrGpuGL;
diff --git a/src/gpu/GrGLInterface.cpp b/src/gpu/gl/GrGLInterface.cpp
similarity index 100%
rename from src/gpu/GrGLInterface.cpp
rename to src/gpu/gl/GrGLInterface.cpp
diff --git a/src/gpu/GrGLProgram.cpp b/src/gpu/gl/GrGLProgram.cpp
similarity index 99%
rename from src/gpu/GrGLProgram.cpp
rename to src/gpu/gl/GrGLProgram.cpp
index e77638f..fb9debf 100644
--- a/src/gpu/GrGLProgram.cpp
+++ b/src/gpu/gl/GrGLProgram.cpp
@@ -9,7 +9,7 @@
#include "GrGLProgram.h"
-#include "GrAllocator.h"
+#include "../GrAllocator.h"
#include "GrGLShaderVar.h"
#include "SkTrace.h"
#include "SkXfermode.h"
diff --git a/src/gpu/GrGLProgram.h b/src/gpu/gl/GrGLProgram.h
similarity index 99%
rename from src/gpu/GrGLProgram.h
rename to src/gpu/gl/GrGLProgram.h
index 4d80f50..dc6093e 100644
--- a/src/gpu/GrGLProgram.h
+++ b/src/gpu/gl/GrGLProgram.h
@@ -10,11 +10,11 @@
#ifndef GrGLProgram_DEFINED
#define GrGLProgram_DEFINED
-#include "GrDrawState.h"
+#include "../GrDrawState.h"
#include "GrGLInterface.h"
#include "GrGLSL.h"
-#include "GrStringBuilder.h"
-#include "GrGpu.h"
+#include "../GrStringBuilder.h"
+#include "../GrGpu.h"
#include "SkXfermode.h"
diff --git a/src/gpu/GrGLRenderTarget.cpp b/src/gpu/gl/GrGLRenderTarget.cpp
similarity index 100%
rename from src/gpu/GrGLRenderTarget.cpp
rename to src/gpu/gl/GrGLRenderTarget.cpp
diff --git a/src/gpu/GrGLRenderTarget.h b/src/gpu/gl/GrGLRenderTarget.h
similarity index 100%
rename from src/gpu/GrGLRenderTarget.h
rename to src/gpu/gl/GrGLRenderTarget.h
diff --git a/src/gpu/GrGLSL.cpp b/src/gpu/gl/GrGLSL.cpp
similarity index 100%
rename from src/gpu/GrGLSL.cpp
rename to src/gpu/gl/GrGLSL.cpp
diff --git a/src/gpu/GrGLSL.h b/src/gpu/gl/GrGLSL.h
similarity index 100%
rename from src/gpu/GrGLSL.h
rename to src/gpu/gl/GrGLSL.h
diff --git a/src/gpu/GrGLShaderVar.h b/src/gpu/gl/GrGLShaderVar.h
similarity index 99%
rename from src/gpu/GrGLShaderVar.h
rename to src/gpu/gl/GrGLShaderVar.h
index 7bec9f9..95c54f3 100644
--- a/src/gpu/GrGLShaderVar.h
+++ b/src/gpu/gl/GrGLShaderVar.h
@@ -11,7 +11,7 @@
#include "GrGLInterface.h"
#include "GrGLSL.h"
-#include "GrStringBuilder.h"
+#include "../GrStringBuilder.h"
#define USE_UNIFORM_FLOAT_ARRAYS true
diff --git a/src/gpu/GrGLStencilBuffer.cpp b/src/gpu/gl/GrGLStencilBuffer.cpp
similarity index 100%
rename from src/gpu/GrGLStencilBuffer.cpp
rename to src/gpu/gl/GrGLStencilBuffer.cpp
diff --git a/src/gpu/GrGLStencilBuffer.h b/src/gpu/gl/GrGLStencilBuffer.h
similarity index 97%
rename from src/gpu/GrGLStencilBuffer.h
rename to src/gpu/gl/GrGLStencilBuffer.h
index eaf7942..02501e7 100644
--- a/src/gpu/GrGLStencilBuffer.h
+++ b/src/gpu/gl/GrGLStencilBuffer.h
@@ -11,7 +11,7 @@
#define GrGLStencilBuffer_DEFINED
#include "GrGLInterface.h"
-#include "GrStencilBuffer.h"
+#include "../GrStencilBuffer.h"
class GrGLStencilBuffer : public GrStencilBuffer {
public:
diff --git a/src/gpu/GrGLTexture.cpp b/src/gpu/gl/GrGLTexture.cpp
similarity index 100%
rename from src/gpu/GrGLTexture.cpp
rename to src/gpu/gl/GrGLTexture.cpp
diff --git a/src/gpu/GrGLTexture.h b/src/gpu/gl/GrGLTexture.h
similarity index 99%
rename from src/gpu/GrGLTexture.h
rename to src/gpu/gl/GrGLTexture.h
index 664742c..d13fc44 100644
--- a/src/gpu/GrGLTexture.h
+++ b/src/gpu/gl/GrGLTexture.h
@@ -10,7 +10,7 @@
#ifndef GrGLTexture_DEFINED
#define GrGLTexture_DEFINED
-#include "GrGpu.h"
+#include "../GrGpu.h"
#include "GrGLRenderTarget.h"
/**
diff --git a/src/gpu/GrGLUtil.cpp b/src/gpu/gl/GrGLUtil.cpp
similarity index 100%
rename from src/gpu/GrGLUtil.cpp
rename to src/gpu/gl/GrGLUtil.cpp
diff --git a/src/gpu/GrGLVertexBuffer.cpp b/src/gpu/gl/GrGLVertexBuffer.cpp
similarity index 100%
rename from src/gpu/GrGLVertexBuffer.cpp
rename to src/gpu/gl/GrGLVertexBuffer.cpp
diff --git a/src/gpu/GrGLVertexBuffer.h b/src/gpu/gl/GrGLVertexBuffer.h
similarity index 96%
rename from src/gpu/GrGLVertexBuffer.h
rename to src/gpu/gl/GrGLVertexBuffer.h
index 15fc54a..ff03d7a 100644
--- a/src/gpu/GrGLVertexBuffer.h
+++ b/src/gpu/gl/GrGLVertexBuffer.h
@@ -11,7 +11,7 @@
#ifndef GrGLVertexBuffer_DEFINED
#define GrGLVertexBuffer_DEFINED
-#include "GrVertexBuffer.h"
+#include "../GrVertexBuffer.h"
#include "GrGLInterface.h"
class GrGpuGL;
diff --git a/src/gpu/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp
similarity index 100%
rename from src/gpu/GrGpuGL.cpp
rename to src/gpu/gl/GrGpuGL.cpp
diff --git a/src/gpu/GrGpuGL.h b/src/gpu/gl/GrGpuGL.h
similarity index 97%
rename from src/gpu/GrGpuGL.h
rename to src/gpu/gl/GrGpuGL.h
index 801f915..2e7e90b 100644
--- a/src/gpu/GrGpuGL.h
+++ b/src/gpu/gl/GrGpuGL.h
@@ -11,8 +11,8 @@
#ifndef GrGpuGL_DEFINED
#define GrGpuGL_DEFINED
-#include "GrDrawState.h"
-#include "GrGpu.h"
+#include "../GrDrawState.h"
+#include "../GrGpu.h"
#include "GrGLContextInfo.h"
#include "GrGLIndexBuffer.h"
#include "GrGLIRect.h"
@@ -27,9 +27,9 @@
const GrGLInterface* glInterface() const {
return fGLContextInfo.interface();
}
- const GrGLBinding glBinding() const { return fGLContextInfo.binding(); }
- const GrGLVersion glVersion() const { return fGLContextInfo.version(); }
- const GrGLSLGeneration glslGeneration() const {
+ GrGLBinding glBinding() const { return fGLContextInfo.binding(); }
+ GrGLVersion glVersion() const { return fGLContextInfo.version(); }
+ GrGLSLGeneration glslGeneration() const {
return fGLContextInfo.glslGeneration();
}
diff --git a/src/gpu/GrGpuGLShaders.cpp b/src/gpu/gl/GrGpuGLShaders.cpp
similarity index 99%
rename from src/gpu/GrGpuGLShaders.cpp
rename to src/gpu/gl/GrGpuGLShaders.cpp
index 81706d7..968b893 100644
--- a/src/gpu/GrGpuGLShaders.cpp
+++ b/src/gpu/gl/GrGpuGLShaders.cpp
@@ -7,19 +7,19 @@
*/
-#include "GrBinHashKey.h"
+#include "../GrBinHashKey.h"
#include "GrGLProgram.h"
#include "GrGLSL.h"
#include "GrGpuGLShaders.h"
-#include "GrGpuVertex.h"
+#include "../GrGpuVertex.h"
#include "GrNoncopyable.h"
-#include "GrStringBuilder.h"
-#include "GrRandom.h"
+#include "../GrStringBuilder.h"
+#include "../GrRandom.h"
#define SKIP_CACHE_CHECK true
#define GR_UINT32_MAX static_cast<uint32_t>(-1)
-#include "GrTHashCache.h"
+#include "../GrTHashCache.h"
class GrGpuGLShaders::ProgramCache : public ::GrNoncopyable {
private:
diff --git a/src/gpu/GrGpuGLShaders.h b/src/gpu/gl/GrGpuGLShaders.h
similarity index 100%
rename from src/gpu/GrGpuGLShaders.h
rename to src/gpu/gl/GrGpuGLShaders.h
diff --git a/src/gpu/SkGLContext.cpp b/src/gpu/gl/SkGLContext.cpp
similarity index 100%
rename from src/gpu/SkGLContext.cpp
rename to src/gpu/gl/SkGLContext.cpp
diff --git a/src/gpu/SkNullGLContext.cpp b/src/gpu/gl/SkNullGLContext.cpp
similarity index 100%
rename from src/gpu/SkNullGLContext.cpp
rename to src/gpu/gl/SkNullGLContext.cpp