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

Unified Diff: src/gpu/GrContext.cpp

Issue 703303003: Add GrGpuResource::CacheAccess (Closed) Base URL: https://skia.googlesource.com/skia.git@nohash
Patch Set: update 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
Index: src/gpu/GrContext.cpp
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index 6f9395b5c3b3662fc2a45f49f5e4618742732fa8..a95fa102f7d893cbcaf7083894db51032705ecbd 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"
@@ -434,7 +436,7 @@ GrTexture* GrContext::createNewScratchTexture(const GrSurfaceDesc& desc) {
if (!texture) {
return NULL;
}
- fResourceCache->addResource(texture->getScratchKey(), texture);
+ fResourceCache->addResource(texture->cacheAccess().getScratchKey(), texture);
return texture;
}
@@ -497,7 +499,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;
}

Powered by Google App Engine
This is Rietveld 408576698