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