aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/ccpr/GrCCClipPath.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/ccpr/GrCCClipPath.cpp')
-rw-r--r--src/gpu/ccpr/GrCCClipPath.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/gpu/ccpr/GrCCClipPath.cpp b/src/gpu/ccpr/GrCCClipPath.cpp
index 9b8a73752c..c98865765e 100644
--- a/src/gpu/ccpr/GrCCClipPath.cpp
+++ b/src/gpu/ccpr/GrCCClipPath.cpp
@@ -48,12 +48,23 @@ void GrCCClipPath::init(GrProxyProvider* proxyProvider,
fAccessRect = accessRect;
}
+void GrCCClipPath::accountForOwnPath(GrCCPerFlushResourceSpecs* resourceSpecs) const {
+ SkASSERT(this->isInitialized());
+
+ ++resourceSpecs->fNumClipPaths;
+ resourceSpecs->fParsingPathStats.statPath(fDeviceSpacePath);
+
+ SkIRect ibounds;
+ if (ibounds.intersect(fAccessRect, fPathDevIBounds)) {
+ resourceSpecs->fAtlasSpecs.accountForSpace(ibounds.width(), ibounds.height());
+ }
+}
+
void GrCCClipPath::renderPathInAtlas(GrCCPerFlushResources* resources,
GrOnFlushResourceProvider* onFlushRP) {
SkASSERT(this->isInitialized());
SkASSERT(!fHasAtlas);
- fAtlas = resources->renderDeviceSpacePathInAtlas(*onFlushRP->caps(), fAccessRect,
- fDeviceSpacePath, fPathDevIBounds,
+ fAtlas = resources->renderDeviceSpacePathInAtlas(fAccessRect, fDeviceSpacePath, fPathDevIBounds,
&fAtlasOffsetX, &fAtlasOffsetY);
SkDEBUGCODE(fHasAtlas = true);
}