Index: src/gpu/gl/GrGLPathRange.cpp |
diff --git a/src/gpu/gl/GrGLPathRange.cpp b/src/gpu/gl/GrGLPathRange.cpp |
index 5e89cb5d87871941bcc40d6b59a5e9b183547607..2df04e3057ef0ba9d1ce66c1910010883c563c03 100644 |
--- a/src/gpu/gl/GrGLPathRange.cpp |
+++ b/src/gpu/gl/GrGLPathRange.cpp |
@@ -8,13 +8,17 @@ |
#include "GrGLPathRange.h" |
#include "GrGLPath.h" |
-#include "GrGLPathRendering.h" |
#include "GrGpuGL.h" |
-GrGLPathRange::GrGLPathRange(GrGpuGL* gpu, size_t size, const SkStrokeRec& stroke) |
+#define GPUGL static_cast<GrGpuGL*>(this->getGpu()) |
+ |
+#define GL_CALL(X) GR_GL_CALL(GPUGL->glInterface(), X) |
+#define GL_CALL_RET(R, X) GR_GL_CALL_RET(GPUGL->glInterface(), R, X) |
+ |
+GrGLPathRange::GrGLPathRange(GrGpu* gpu, size_t size, const SkStrokeRec& stroke) |
: INHERITED(gpu, size, stroke), |
- fBasePathID(gpu->pathRendering()->genPaths(fSize)), |
fNumDefinedPaths(0) { |
+ GL_CALL_RET(fBasePathID, GenPaths(fSize)); |
} |
GrGLPathRange::~GrGLPathRange() { |
@@ -27,10 +31,15 @@ |
return; |
} |
+#ifdef SK_DEBUG |
// Make sure the path at this index hasn't been initted already. |
- SkASSERT(GR_GL_FALSE == gpu->pathRendering()->isPath(fBasePathID + index)); |
+ GrGLboolean hasPathAtIndex; |
+ GL_CALL_RET(hasPathAtIndex, IsPath(fBasePathID + index)); |
+ SkASSERT(GR_GL_FALSE == hasPathAtIndex); |
+#endif |
- GrGLPath::InitPathObject(gpu, fBasePathID + index, skPath, fStroke); |
+ GrGLPath::InitPathObject(gpu->glInterface(), fBasePathID + index, skPath, fStroke); |
+ |
++fNumDefinedPaths; |
this->didChangeGpuMemorySize(); |
} |
@@ -39,7 +48,7 @@ |
SkASSERT(NULL != this->getGpu()); |
if (0 != fBasePathID && !this->isWrapped()) { |
- static_cast<GrGpuGL*>(this->getGpu())->pathRendering()->deletePaths(fBasePathID, fSize); |
+ GL_CALL(DeletePaths(fBasePathID, fSize)); |
fBasePathID = 0; |
} |