| Index: src/gpu/GrIndexBuffer.h
|
| diff --git a/src/gpu/GrIndexBuffer.h b/src/gpu/GrIndexBuffer.h
|
| index bf64ff87d28143d18cf31810d81144ce842065fc..2e3b437adfc3712f5500cc62fe554fcf4f4ad961 100644
|
| --- a/src/gpu/GrIndexBuffer.h
|
| +++ b/src/gpu/GrIndexBuffer.h
|
| @@ -36,9 +36,12 @@ public:
|
| protected:
|
| GrIndexBuffer(GrGpu* gpu, size_t gpuMemorySize, bool dynamic, bool cpuBacked)
|
| : INHERITED(gpu, gpuMemorySize, dynamic, cpuBacked) {
|
| - GrScratchKey key;
|
| - ComputeScratchKey(gpuMemorySize, dynamic, &key);
|
| - this->setScratchKey(key);
|
| + // We currently only make buffers scratch if they're both pow2 sized and not cpuBacked.
|
| + if (!cpuBacked && SkIsPow2(gpuMemorySize)) {
|
| + GrScratchKey key;
|
| + ComputeScratchKey(gpuMemorySize, dynamic, &key);
|
| + this->setScratchKey(key);
|
| + }
|
| }
|
|
|
| private:
|
|
|