Revert "Calculate rough approximations for nvpr path sizes"
This reverts commit 61bff7097251755bf9fa9a4ec60cc057c766b4a4.
This is built on 5672da0fa54f31c9727568e9dd5fe82c6e1585bc
which is causing blink test failures on canvas-lost-gpu-context.html.
diff --git a/src/gpu/gl/GrGLPathRange.cpp b/src/gpu/gl/GrGLPathRange.cpp
index 9e2b2e7..5e89cb5 100644
--- a/src/gpu/gl/GrGLPathRange.cpp
+++ b/src/gpu/gl/GrGLPathRange.cpp
@@ -14,7 +14,7 @@
GrGLPathRange::GrGLPathRange(GrGpuGL* gpu, size_t size, const SkStrokeRec& stroke)
: INHERITED(gpu, size, stroke),
fBasePathID(gpu->pathRendering()->genPaths(fSize)),
- fGpuMemorySize(0) {
+ fNumDefinedPaths(0) {
}
GrGLPathRange::~GrGLPathRange() {
@@ -30,7 +30,8 @@
// Make sure the path at this index hasn't been initted already.
SkASSERT(GR_GL_FALSE == gpu->pathRendering()->isPath(fBasePathID + index));
- fGpuMemorySize += GrGLPath::InitPathObject(gpu, fBasePathID + index, skPath, fStroke);
+ GrGLPath::InitPathObject(gpu, fBasePathID + index, skPath, fStroke);
+ ++fNumDefinedPaths;
this->didChangeGpuMemorySize();
}