Index: src/gpu/GrStencilAndCoverPathRenderer.cpp |
diff --git a/src/gpu/GrStencilAndCoverPathRenderer.cpp b/src/gpu/GrStencilAndCoverPathRenderer.cpp |
index e60bea215a702fffc7eb56729def2c3acb8048be..97b20773a7e0e6797d1e7f60d38937fe1d749c86 100644 |
--- a/src/gpu/GrStencilAndCoverPathRenderer.cpp |
+++ b/src/gpu/GrStencilAndCoverPathRenderer.cpp |
@@ -75,12 +75,15 @@ GrStencilAndCoverPathRenderer::onGetStencilSupport(const GrDrawTarget*, |
static GrPath* get_gr_path(GrGpu* gpu, const SkPath& skPath, const GrStrokeInfo& stroke) { |
GrContext* ctx = gpu->getContext(); |
GrUniqueKey key; |
- GrPath::ComputeKey(skPath, stroke, &key); |
+ bool isVolatile; |
+ GrPath::ComputeKey(skPath, stroke, &key, &isVolatile); |
SkAutoTUnref<GrPath> path( |
static_cast<GrPath*>(ctx->resourceProvider()->findAndRefResourceByUniqueKey(key))); |
if (NULL == path) { |
path.reset(gpu->pathRendering()->createPath(skPath, stroke)); |
- ctx->resourceProvider()->assignUniqueKeyToResource(key, path); |
+ if (!isVolatile) { |
+ ctx->resourceProvider()->assignUniqueKeyToResource(key, path); |
+ } |
} else { |
SkASSERT(path->isEqualTo(skPath, stroke)); |
} |