| Index: src/gpu/vk/GrVkDescriptorSet.cpp
|
| diff --git a/src/gpu/vk/GrVkDescriptorSet.cpp b/src/gpu/vk/GrVkDescriptorSet.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..47a997f5506e7c6669b5de0ecb18aecbce026723
|
| --- /dev/null
|
| +++ b/src/gpu/vk/GrVkDescriptorSet.cpp
|
| @@ -0,0 +1,34 @@
|
| +/*
|
| +* Copyright 2016 Google Inc.
|
| +*
|
| +* Use of this source code is governed by a BSD-style license that can be
|
| +* found in the LICENSE file.
|
| +*/
|
| +
|
| +#include "GrVkDescriptorSet.h"
|
| +
|
| +#include "GrVkDescriptorPool.h"
|
| +#include "GrVkGpu.h"
|
| +#include "GrVkResourceProvider.h"
|
| +
|
| +GrVkDescriptorSet::GrVkDescriptorSet(VkDescriptorSet descSet,
|
| + GrVkDescriptorPool* pool,
|
| + GrVkDescriptorSetManager::Handle handle)
|
| + : fDescSet(descSet)
|
| + , fPool(pool)
|
| + , fHandle(handle) {
|
| + fPool->ref();
|
| +}
|
| +
|
| +void GrVkDescriptorSet::freeGPUData(const GrVkGpu* gpu) const {
|
| + fPool->unref(gpu);
|
| +}
|
| +
|
| +void GrVkDescriptorSet::onRecycle(GrVkGpu* gpu) const {
|
| + gpu->resourceProvider().recycleDescriptorSet(this, fHandle);
|
| +}
|
| +
|
| +void GrVkDescriptorSet::abandonSubResources() const {
|
| + fPool->unrefAndAbandon();
|
| +}
|
| +
|
|
|