Flutter Engine
The Flutter Engine
third_party
skia
src
gpu
graphite
vk
VulkanDescriptorSet.h
Go to the documentation of this file.
1
/*
2
* Copyright 2023 Google LLC
3
*
4
* Use of this source code is governed by a BSD-style license that can be
5
* found in the LICENSE file.
6
*/
7
8
#ifndef skgpu_graphite_VulkanDescriptorSet_DEFINED
9
#define skgpu_graphite_VulkanDescriptorSet_DEFINED
10
11
#include "
src/gpu/graphite/Resource.h
"
12
13
#include "
src/gpu/graphite/DescriptorData.h
"
14
#include "
src/gpu/graphite/vk/VulkanGraphiteUtilsPriv.h
"
15
16
namespace
skgpu::graphite
{
17
18
class
VulkanDescriptorPool;
19
class
VulkanSharedContext;
20
21
/**
22
* Wrapper around VkDescriptorSet which maintains a reference to its descriptor pool. Once the ref
23
* count on that pool is 0, it will be destroyed.
24
*/
25
class
VulkanDescriptorSet
:
public
Resource
{
26
public
:
27
static
sk_sp<VulkanDescriptorSet>
Make
(
const
VulkanSharedContext
*,
28
const
sk_sp<VulkanDescriptorPool>
&);
29
30
VulkanDescriptorSet
(
const
VulkanSharedContext
*,
31
VkDescriptorSet,
32
sk_sp<VulkanDescriptorPool>
);
33
34
const
VkDescriptorSet*
descriptorSet
() {
return
&fDescSet; }
35
36
const
char
*
getResourceType
()
const override
{
return
"Vulkan Descriptor Set"
; }
37
38
private
:
39
void
freeGpuData()
override
;
40
41
VkDescriptorSet fDescSet;
42
// Have this class hold on to a reference of the descriptor pool. When a pool's reference count
43
// is 0, that means all the descriptor sets that came from that pool are no longer needed, so
44
// the pool can safely be destroyed.
45
sk_sp<VulkanDescriptorPool>
fPool;
46
};
47
}
// namespace skgpu::graphite
48
49
#endif
// skgpu_graphite_VulkanDescriptorSet_DEFINED
DescriptorData.h
Resource.h
VulkanGraphiteUtilsPriv.h
sk_sp
Definition:
SkRefCnt.h:220
skgpu::graphite::Resource
Definition:
Resource.h:37
skgpu::graphite::VulkanDescriptorSet
Definition:
VulkanDescriptorSet.h:25
skgpu::graphite::VulkanDescriptorSet::VulkanDescriptorSet
VulkanDescriptorSet(const VulkanSharedContext *, VkDescriptorSet, sk_sp< VulkanDescriptorPool >)
Definition:
VulkanDescriptorSet.cpp:35
skgpu::graphite::VulkanDescriptorSet::Make
static sk_sp< VulkanDescriptorSet > Make(const VulkanSharedContext *, const sk_sp< VulkanDescriptorPool > &)
Definition:
VulkanDescriptorSet.cpp:15
skgpu::graphite::VulkanDescriptorSet::descriptorSet
const VkDescriptorSet * descriptorSet()
Definition:
VulkanDescriptorSet.h:34
skgpu::graphite::VulkanDescriptorSet::getResourceType
const char * getResourceType() const override
Definition:
VulkanDescriptorSet.h:36
skgpu::graphite::VulkanSharedContext
Definition:
VulkanSharedContext.h:28
skgpu::graphite
Definition:
BoundsManagerBench.cpp:27
Generated on Sun Jun 23 2024 21:56:28 for Flutter Engine by
1.9.4