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

Unified Diff: src/gpu/GrStencilAndCoverPathRenderer.cpp

Issue 1107973004: Pull cache out of GrContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fixpicturerenderer.cpp Created 5 years, 8 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/GrSWMaskHelper.cpp ('k') | src/gpu/GrStencilAndCoverTextContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrStencilAndCoverPathRenderer.cpp
diff --git a/src/gpu/GrStencilAndCoverPathRenderer.cpp b/src/gpu/GrStencilAndCoverPathRenderer.cpp
index 4c9fdea34e1cc2f98770bbbdf1628bcd74ad9de8..33b988e277207e6829638c8c1c8bd34b42276bad 100644
--- a/src/gpu/GrStencilAndCoverPathRenderer.cpp
+++ b/src/gpu/GrStencilAndCoverPathRenderer.cpp
@@ -14,6 +14,7 @@
#include "GrPath.h"
#include "GrRenderTarget.h"
#include "GrRenderTargetPriv.h"
+#include "GrResourceProvider.h"
#include "GrStrokeInfo.h"
/*
@@ -76,10 +77,11 @@ static GrPath* get_gr_path(GrGpu* gpu, const SkPath& skPath, const SkStrokeRec&
GrContext* ctx = gpu->getContext();
GrUniqueKey key;
GrPath::ComputeKey(skPath, stroke, &key);
- SkAutoTUnref<GrPath> path(static_cast<GrPath*>(ctx->findAndRefCachedResource(key)));
+ SkAutoTUnref<GrPath> path(
+ static_cast<GrPath*>(ctx->resourceProvider()->findAndRefResourceByUniqueKey(key)));
if (NULL == path || !path->isEqualTo(skPath, stroke)) {
path.reset(gpu->pathRendering()->createPath(skPath, stroke));
- ctx->addResourceToCache(key, path);
+ ctx->resourceProvider()->assignUniqueKeyToResource(key, path);
}
return path.detach();
}
« no previous file with comments | « src/gpu/GrSWMaskHelper.cpp ('k') | src/gpu/GrStencilAndCoverTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698