Index: src/gpu/GrTexture.cpp |
diff --git a/src/gpu/GrTexture.cpp b/src/gpu/GrTexture.cpp |
index 7984460545db61d3b5dfb8c6120f24719e909365..905455a9ec7030b1ac3d69019927888da320f637 100644 |
--- a/src/gpu/GrTexture.cpp |
+++ b/src/gpu/GrTexture.cpp |
@@ -98,18 +98,16 @@ GrTexture::GrTexture(GrGpu* gpu, LifeCycle lifeCycle, const GrSurfaceDesc& desc) |
void GrTexturePriv::ComputeScratchKey(const GrSurfaceDesc& desc, GrScratchKey* key) { |
static const GrScratchKey::ResourceType kType = GrScratchKey::GenerateResourceType(); |
- GrScratchKey::Builder builder(key, kType, 2); |
- |
GrSurfaceOrigin origin = resolve_origin(desc); |
uint32_t flags = desc.fFlags & ~kCheckAllocation_GrSurfaceFlag; |
- SkASSERT(desc.fWidth <= SK_MaxU16); |
- SkASSERT(desc.fHeight <= SK_MaxU16); |
SkASSERT(static_cast<int>(desc.fConfig) < (1 << 6)); |
SkASSERT(desc.fSampleCnt < (1 << 8)); |
SkASSERT(flags < (1 << 10)); |
SkASSERT(static_cast<int>(origin) < (1 << 8)); |
- builder[0] = desc.fWidth | (desc.fHeight << 16); |
- builder[1] = desc.fConfig | (desc.fSampleCnt << 6) | (flags << 14) | (origin << 24); |
+ GrScratchKey::Builder builder(key, kType, 3); |
+ builder[0] = desc.fWidth; |
+ builder[1] = desc.fHeight; |
+ builder[2] = desc.fConfig | (desc.fSampleCnt << 6) | (flags << 14) | (origin << 24); |
} |