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

Unified Diff: src/effects/SkColorCubeFilter.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/effects/SkBlurMaskFilter.cpp ('k') | src/effects/SkDisplacementMapEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkColorCubeFilter.cpp
diff --git a/src/effects/SkColorCubeFilter.cpp b/src/effects/SkColorCubeFilter.cpp
index 3878e5fc197869dae8b1ec4accdbc7cd8283465d..253d2877596946a72899c83cc79648e7c3d0e0b2 100644
--- a/src/effects/SkColorCubeFilter.cpp
+++ b/src/effects/SkColorCubeFilter.cpp
@@ -351,11 +351,13 @@ bool SkColorCubeFilter::asFragmentProcessors(GrContext* context,
desc.fHeight = fCache.cubeDimension() * fCache.cubeDimension();
desc.fConfig = kRGBA_8888_GrPixelConfig;
- SkAutoTUnref<GrTexture> textureCube(context->findAndRefCachedTexture(key));
+ SkAutoTUnref<GrTexture> textureCube(
+ context->textureProvider()->findAndRefTextureByUniqueKey(key));
if (!textureCube) {
- textureCube.reset(context->createTexture(desc, true, fCubeData->data(), 0));
+ textureCube.reset(context->textureProvider()->createTexture(
+ desc, true, fCubeData->data(), 0));
if (textureCube) {
- context->addResourceToCache(key, textureCube);
+ context->textureProvider()->assignUniqueKeyToTexture(key, textureCube);
}
}
« no previous file with comments | « src/effects/SkBlurMaskFilter.cpp ('k') | src/effects/SkDisplacementMapEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698