diff options
author | 2015-07-31 13:59:30 -0700 | |
---|---|---|
committer | 2015-07-31 13:59:31 -0700 | |
commit | eae6200acbec2255ac00ab363ffbe16758ec9076 (patch) | |
tree | a37be1fb02820c40d0ad99366b557997d6b78831 /src/gpu/GrVertexBuffer.h | |
parent | 77d89f7dd243a17452d3a5f16a98622993e6bdd9 (diff) |
Some cleanup in GrTextureProvider and GrResourceProvider.
Review URL: https://codereview.chromium.org/1261643004
Diffstat (limited to 'src/gpu/GrVertexBuffer.h')
-rw-r--r-- | src/gpu/GrVertexBuffer.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gpu/GrVertexBuffer.h b/src/gpu/GrVertexBuffer.h index 3c12cd76d2..3c62cd61ca 100644 --- a/src/gpu/GrVertexBuffer.h +++ b/src/gpu/GrVertexBuffer.h @@ -27,9 +27,12 @@ public: protected: GrVertexBuffer(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: |