| Index: src/gpu/GrContext.cpp
|
| diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
|
| index 2818aa92dd325090b2e97d0da5e0f2ab45174c82..5ba27cf26fc3e5352998836b8d16069f64e00768 100755
|
| --- a/src/gpu/GrContext.cpp
|
| +++ b/src/gpu/GrContext.cpp
|
| @@ -411,7 +411,8 @@ GrTexture* GrContext::refScratchTexture(const GrSurfaceDesc& inDesc, ScratchTexM
|
| }
|
|
|
| do {
|
| - GrResourceKey key = GrTexturePriv::ComputeScratchKey(*desc);
|
| + GrScratchKey key;
|
| + GrTexturePriv::ComputeScratchKey(*desc, &key);
|
| uint32_t scratchFlags = 0;
|
| if (calledDuringFlush) {
|
| scratchFlags = GrResourceCache2::kRequireNoPendingIO_ScratchFlag;
|
| @@ -445,8 +446,11 @@ GrTexture* GrContext::refScratchTexture(const GrSurfaceDesc& inDesc, ScratchTexM
|
| }
|
|
|
| GrTexture* texture = fGpu->createTexture(*desc, NULL, 0);
|
| - SkASSERT(NULL == texture ||
|
| - texture->cacheAccess().getScratchKey() == GrTexturePriv::ComputeScratchKey(*desc));
|
| +#ifdef SK_DEBUG
|
| + GrScratchKey key;
|
| + GrTexturePriv::ComputeScratchKey(*desc, &key);
|
| + SkASSERT(NULL == texture || texture->cacheAccess().getScratchKey() == key);
|
| +#endif
|
| return texture;
|
| }
|
|
|
|
|