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); |