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

Unified Diff: src/gpu/GrTexture.cpp

Issue 707493002: Use GrResourceCache2 to service content key lookups (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: move #ifdef SK_SUPPORT_GPU 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 | « src/gpu/GrResourceCache2.cpp ('k') | tests/ResourceCacheTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrTexture.cpp
diff --git a/src/gpu/GrTexture.cpp b/src/gpu/GrTexture.cpp
index 21395409d64bb7b818ff520b8a0abf2bb0725008..72e82252dceccc0de582cb0dc8a0983a1074575a 100644
--- a/src/gpu/GrTexture.cpp
+++ b/src/gpu/GrTexture.cpp
@@ -121,7 +121,10 @@ GrSurfaceOrigin resolve_origin(const GrSurfaceDesc& desc) {
GrTexture::GrTexture(GrGpu* gpu, bool isWrapped, const GrSurfaceDesc& desc)
: INHERITED(gpu, isWrapped, desc)
, fMipMapsStatus(kNotAllocated_MipMapsStatus) {
- this->setScratchKey(GrTexturePriv::ComputeScratchKey(desc));
+
+ if (!isWrapped) {
+ this->setScratchKey(GrTexturePriv::ComputeScratchKey(desc));
+ }
// only make sense if alloc size is pow2
fShiftFixedX = 31 - SkCLZ(fDesc.fWidth);
fShiftFixedY = 31 - SkCLZ(fDesc.fHeight);
« no previous file with comments | « src/gpu/GrResourceCache2.cpp ('k') | tests/ResourceCacheTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698