Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(367)

Unified Diff: src/gpu/gl/GrGLPathRange.cpp

Issue 443133003: Revert of Wrap NV_path_rendering API with GrGLPathRendering (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/GrGLPathRange.h ('k') | src/gpu/gl/GrGLPathRendering.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « src/gpu/gl/GrGLPathRange.h ('k') | src/gpu/gl/GrGLPathRendering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698