Move GL-specific source code to make room for D3D back end.
authortomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Fri, 10 Feb 2012 21:01:00 +0000 (21:01 +0000)
committertomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Fri, 10 Feb 2012 21:01:00 +0000 (21:01 +0000)
git-svn-id: http://skia.googlecode.com/svn/trunk@3165 2bbb7eff-a529-9590-31e7-b0007b416f81

32 files changed:
src/gpu/GrGpu.cpp
src/gpu/GrGpuFactory.cpp
src/gpu/gl/GrGLContextInfo.cpp [moved from src/gpu/GrGLContextInfo.cpp with 100% similarity]
src/gpu/gl/GrGLContextInfo.h [moved from src/gpu/GrGLContextInfo.h with 100% similarity]
src/gpu/gl/GrGLCreateNativeInterface_none.cpp [moved from src/gpu/GrGLCreateNativeInterface_none.cpp with 100% similarity]
src/gpu/gl/GrGLCreateNullInterface.cpp [moved from src/gpu/GrGLCreateNullInterface.cpp with 99% similarity]
src/gpu/gl/GrGLDefaultInterface_native.cpp [moved from src/gpu/GrGLDefaultInterface_native.cpp with 100% similarity]
src/gpu/gl/GrGLDefaultInterface_none.cpp [moved from src/gpu/GrGLDefaultInterface_none.cpp with 100% similarity]
src/gpu/gl/GrGLIRect.h [moved from src/gpu/GrGLIRect.h with 100% similarity]
src/gpu/gl/GrGLIndexBuffer.cpp [moved from src/gpu/GrGLIndexBuffer.cpp with 100% similarity]
src/gpu/gl/GrGLIndexBuffer.h [moved from src/gpu/GrGLIndexBuffer.h with 97% similarity]
src/gpu/gl/GrGLInterface.cpp [moved from src/gpu/GrGLInterface.cpp with 100% similarity]
src/gpu/gl/GrGLProgram.cpp [moved from src/gpu/GrGLProgram.cpp with 99% similarity]
src/gpu/gl/GrGLProgram.h [moved from src/gpu/GrGLProgram.h with 99% similarity]
src/gpu/gl/GrGLRenderTarget.cpp [moved from src/gpu/GrGLRenderTarget.cpp with 100% similarity]
src/gpu/gl/GrGLRenderTarget.h [moved from src/gpu/GrGLRenderTarget.h with 100% similarity]
src/gpu/gl/GrGLSL.cpp [moved from src/gpu/GrGLSL.cpp with 100% similarity]
src/gpu/gl/GrGLSL.h [moved from src/gpu/GrGLSL.h with 100% similarity]
src/gpu/gl/GrGLShaderVar.h [moved from src/gpu/GrGLShaderVar.h with 99% similarity]
src/gpu/gl/GrGLStencilBuffer.cpp [moved from src/gpu/GrGLStencilBuffer.cpp with 100% similarity]
src/gpu/gl/GrGLStencilBuffer.h [moved from src/gpu/GrGLStencilBuffer.h with 97% similarity]
src/gpu/gl/GrGLTexture.cpp [moved from src/gpu/GrGLTexture.cpp with 100% similarity]
src/gpu/gl/GrGLTexture.h [moved from src/gpu/GrGLTexture.h with 99% similarity]
src/gpu/gl/GrGLUtil.cpp [moved from src/gpu/GrGLUtil.cpp with 100% similarity]
src/gpu/gl/GrGLVertexBuffer.cpp [moved from src/gpu/GrGLVertexBuffer.cpp with 100% similarity]
src/gpu/gl/GrGLVertexBuffer.h [moved from src/gpu/GrGLVertexBuffer.h with 97% similarity]
src/gpu/gl/GrGpuGL.cpp [moved from src/gpu/GrGpuGL.cpp with 100% similarity]
src/gpu/gl/GrGpuGL.h [moved from src/gpu/GrGpuGL.h with 98% similarity]
src/gpu/gl/GrGpuGLShaders.cpp [moved from src/gpu/GrGpuGLShaders.cpp with 99% similarity]
src/gpu/gl/GrGpuGLShaders.h [moved from src/gpu/GrGpuGLShaders.h with 100% similarity]
src/gpu/gl/SkGLContext.cpp [moved from src/gpu/SkGLContext.cpp with 100% similarity]
src/gpu/gl/SkNullGLContext.cpp [moved from src/gpu/SkNullGLContext.cpp with 100% similarity]

index 39960de..57769e9 100644 (file)
@@ -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
index 7d53e79..7d0678e 100644 (file)
@@ -17,7 +17,7 @@
 #include "GrGLConfig.h"
 
 #include "GrGpu.h"
-#include "GrGpuGLShaders.h"
+#include "gl/GrGpuGLShaders.h"
 
 GrGpu* GrGpu::Create(GrEngine engine, GrPlatform3DContext context3D) {
 
similarity index 99%
rename from src/gpu/GrGLCreateNullInterface.cpp
rename to src/gpu/gl/GrGLCreateNullInterface.cpp
index d4a88c1..cdac75f 100644 (file)
@@ -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 @@ GrGLvoid GR_GL_FUNCTION_TYPE nullGLDeleteIds(GrGLsizei n, const GrGLuint* ids) {
 
 // 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;
similarity index 100%
rename from src/gpu/GrGLIRect.h
rename to src/gpu/gl/GrGLIRect.h
similarity index 97%
rename from src/gpu/GrGLIndexBuffer.h
rename to src/gpu/gl/GrGLIndexBuffer.h
index c3e2287..9f32890 100644 (file)
@@ -11,7 +11,7 @@
 #ifndef GrGLIndexBuffer_DEFINED
 #define GrGLIndexBuffer_DEFINED
 
-#include "GrIndexBuffer.h"
+#include "../GrIndexBuffer.h"
 #include "GrGLInterface.h"
 
 class GrGpuGL;
similarity index 99%
rename from src/gpu/GrGLProgram.cpp
rename to src/gpu/gl/GrGLProgram.cpp
index e77638f..fb9debf 100644 (file)
@@ -9,7 +9,7 @@
 
 #include "GrGLProgram.h"
 
-#include "GrAllocator.h"
+#include "../GrAllocator.h"
 #include "GrGLShaderVar.h"
 #include "SkTrace.h"
 #include "SkXfermode.h"
similarity index 99%
rename from src/gpu/GrGLProgram.h
rename to src/gpu/gl/GrGLProgram.h
index 4d80f50..dc6093e 100644 (file)
 #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"
 
similarity index 100%
rename from src/gpu/GrGLSL.cpp
rename to src/gpu/gl/GrGLSL.cpp
similarity index 100%
rename from src/gpu/GrGLSL.h
rename to src/gpu/gl/GrGLSL.h
similarity index 99%
rename from src/gpu/GrGLShaderVar.h
rename to src/gpu/gl/GrGLShaderVar.h
index 7bec9f9..95c54f3 100644 (file)
@@ -11,7 +11,7 @@
 
 #include "GrGLInterface.h"
 #include "GrGLSL.h"
-#include "GrStringBuilder.h"
+#include "../GrStringBuilder.h"
 
 #define USE_UNIFORM_FLOAT_ARRAYS true
 
similarity index 97%
rename from src/gpu/GrGLStencilBuffer.h
rename to src/gpu/gl/GrGLStencilBuffer.h
index eaf7942..02501e7 100644 (file)
@@ -11,7 +11,7 @@
 #define GrGLStencilBuffer_DEFINED
 
 #include "GrGLInterface.h"
-#include "GrStencilBuffer.h"
+#include "../GrStencilBuffer.h"
 
 class GrGLStencilBuffer : public GrStencilBuffer {
 public:
similarity index 99%
rename from src/gpu/GrGLTexture.h
rename to src/gpu/gl/GrGLTexture.h
index 664742c..d13fc44 100644 (file)
@@ -10,7 +10,7 @@
 #ifndef GrGLTexture_DEFINED
 #define GrGLTexture_DEFINED
 
-#include "GrGpu.h"
+#include "../GrGpu.h"
 #include "GrGLRenderTarget.h"
 
 /**
similarity index 100%
rename from src/gpu/GrGLUtil.cpp
rename to src/gpu/gl/GrGLUtil.cpp
similarity index 97%
rename from src/gpu/GrGLVertexBuffer.h
rename to src/gpu/gl/GrGLVertexBuffer.h
index 15fc54a..ff03d7a 100644 (file)
@@ -11,7 +11,7 @@
 #ifndef GrGLVertexBuffer_DEFINED
 #define GrGLVertexBuffer_DEFINED
 
-#include "GrVertexBuffer.h"
+#include "../GrVertexBuffer.h"
 #include "GrGLInterface.h"
 
 class GrGpuGL;
similarity index 100%
rename from src/gpu/GrGpuGL.cpp
rename to src/gpu/gl/GrGpuGL.cpp
similarity index 98%
rename from src/gpu/GrGpuGL.h
rename to src/gpu/gl/GrGpuGL.h
index 801f915..2e7e90b 100644 (file)
@@ -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 @@ public:
     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();
     }
 
similarity index 99%
rename from src/gpu/GrGpuGLShaders.cpp
rename to src/gpu/gl/GrGpuGLShaders.cpp
index 81706d7..968b893 100644 (file)
@@ -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: