diff options
Diffstat (limited to 'src/gpu/GrTexture.cpp')
-rw-r--r-- | src/gpu/GrTexture.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/gpu/GrTexture.cpp b/src/gpu/GrTexture.cpp index 064cc0a22b..cbab5f0f60 100644 --- a/src/gpu/GrTexture.cpp +++ b/src/gpu/GrTexture.cpp @@ -76,14 +76,16 @@ GrTexture::GrTexture(GrGpu* gpu, const GrSurfaceDesc& desc, GrSLType samplerType } void GrTexture::computeScratchKey(GrScratchKey* key) const { - const GrRenderTarget* rt = this->asRenderTarget(); - int sampleCount = 0; - if (rt) { - sampleCount = rt->numStencilSamples(); + if (!GrPixelConfigIsCompressed(this->config())) { + const GrRenderTarget* rt = this->asRenderTarget(); + int sampleCount = 0; + if (rt) { + sampleCount = rt->numStencilSamples(); + } + GrTexturePriv::ComputeScratchKey(this->config(), this->width(), this->height(), + this->origin(), SkToBool(rt), sampleCount, + this->texturePriv().hasMipMaps(), key); } - GrTexturePriv::ComputeScratchKey(this->config(), this->width(), this->height(), - this->origin(), SkToBool(rt), sampleCount, - this->texturePriv().hasMipMaps(), key); } void GrTexturePriv::ComputeScratchKey(GrPixelConfig config, int width, int height, |