diff options
author | 2016-04-06 14:26:33 -0700 | |
---|---|---|
committer | 2016-04-06 14:26:34 -0700 | |
commit | deacc97bc63513b5eacaf21f858727f6e8b98ce5 (patch) | |
tree | 4c4c0f5e995f752b076c39fdf6c4eafc3057fdf4 /src/gpu/vk/GrVkIndexBuffer.cpp | |
parent | 48156ed412410c9d27b560e8596e3f34d175a277 (diff) |
Track GL buffer state based on unique resource ID
Reworks GrGLGpu to track GL buffer state based on the unique
GrGpuResource ID. This eliminates the need to notify the gpu object
whenever a buffer is deleted.
This change also allows us to remove the type specifier from GrBuffer.
At this point a buffer is just a chunk of memory, and the type
given at creation time is just a suggestion to the GL backend about
which target to bind to for updates.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1854283004
Review URL: https://codereview.chromium.org/1854283004
Diffstat (limited to 'src/gpu/vk/GrVkIndexBuffer.cpp')
-rw-r--r-- | src/gpu/vk/GrVkIndexBuffer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gpu/vk/GrVkIndexBuffer.cpp b/src/gpu/vk/GrVkIndexBuffer.cpp index 7342e939e1..02e100d28a 100644 --- a/src/gpu/vk/GrVkIndexBuffer.cpp +++ b/src/gpu/vk/GrVkIndexBuffer.cpp @@ -10,7 +10,7 @@ GrVkIndexBuffer::GrVkIndexBuffer(GrVkGpu* gpu, const GrVkBuffer::Desc& desc, const GrVkBuffer::Resource* bufferResource) - : INHERITED(gpu, kIndex_GrBufferType, desc.fSizeInBytes, + : INHERITED(gpu, desc.fSizeInBytes, kIndex_GrBufferType, desc.fDynamic ? kDynamic_GrAccessPattern : kStatic_GrAccessPattern, false) , GrVkBuffer(desc, bufferResource) { this->registerWithCache(); |