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

Unified Diff: src/gpu/GrContext.cpp

Issue 703303003: Add GrGpuResource::CacheAccess (Closed) Base URL: https://skia.googlesource.com/skia.git@nohash
Patch Set: fix warning Created 6 years, 1 month 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 | « include/gpu/GrGpuResource.h ('k') | src/gpu/GrGpuResource.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrContext.cpp
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index fee62a8dc4a96058ade1fd9870f44dd1a744922a..da35033b77a5931ec4c09388abdcbc5fde8a7105 100755
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -15,6 +15,8 @@
#include "GrAARectRenderer.h"
#include "GrBufferAllocPool.h"
#include "GrGpu.h"
+#include "GrGpuResource.h"
+#include "GrGpuResourceCacheAccess.h"
#include "GrDistanceFieldTextContext.h"
#include "GrDrawTargetCaps.h"
#include "GrIndexBuffer.h"
@@ -433,7 +435,7 @@ GrTexture* GrContext::createNewScratchTexture(const GrSurfaceDesc& desc) {
if (!texture) {
return NULL;
}
- fResourceCache->addResource(texture->getScratchKey(), texture);
+ fResourceCache->addResource(texture->cacheAccess().getScratchKey(), texture);
return texture;
}
@@ -496,7 +498,7 @@ GrTexture* GrContext::refScratchTexture(const GrSurfaceDesc& inDesc, ScratchTexM
GrTexture* texture = this->createNewScratchTexture(*desc);
SkASSERT(NULL == texture ||
- texture->getScratchKey() == GrTexturePriv::ComputeScratchKey(*desc));
+ texture->cacheAccess().getScratchKey() == GrTexturePriv::ComputeScratchKey(*desc));
return texture;
}
« no previous file with comments | « include/gpu/GrGpuResource.h ('k') | src/gpu/GrGpuResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698