Flutter Engine
The Flutter Engine
third_party
skia
src
gpu
graphite
vk
VulkanImageView.h
Go to the documentation of this file.
1
/*
2
* Copyright 2023 Google Inc.
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_VulkanImageView_DEFINED
9
#define skgpu_graphite_VulkanImageView_DEFINED
10
11
#include "
include/gpu/vk/VulkanTypes.h
"
12
#include "
src/gpu/graphite/Resource.h
"
13
#include "
src/gpu/graphite/vk/VulkanYcbcrConversion.h
"
14
15
namespace
skgpu::graphite
{
16
17
class
VulkanSharedContext;
18
class
VulkanResourceProvider;
19
20
/*
21
* VulkanImageView is not derived from Resource as its lifetime is dependent on the lifetime of
22
* its associated VulkanTexture. Hence VulkanTexture will act as a container for its ImageViews
23
* w.r.t. the ResourceCache and CommandBuffer, and is responsible for deleting its ImageView
24
* children when freeGpuData() is called.
25
*/
26
class
VulkanImageView
{
27
public
:
28
enum class
Usage
{
29
kShaderInput,
30
kAttachment
31
};
32
33
static
std::unique_ptr<const VulkanImageView>
Make
(
34
const
VulkanSharedContext
* sharedContext,
35
VkImage
image
,
36
VkFormat
format
,
37
Usage
usage
,
38
uint32_t miplevels,
39
sk_sp<VulkanYcbcrConversion>
);
40
~VulkanImageView
();
41
42
VkImageView
imageView
()
const
{
return
fImageView; }
43
Usage
usage
()
const
{
return
fUsage; }
44
45
private
:
46
VulkanImageView
(
const
VulkanSharedContext
*, VkImageView,
Usage
,
sk_sp<VulkanYcbcrConversion>
);
47
48
// Since we're not derived from Resource we need to store the context for deletion later
49
const
VulkanSharedContext
* fSharedContext;
50
VkImageView fImageView;
51
Usage
fUsage;
52
sk_sp<VulkanYcbcrConversion>
fYcbcrConversion;
53
};
54
55
}
// namespace skgpu::graphite
56
57
#endif
// skgpu_graphite_VulkanImageView_DEFINED
Resource.h
VulkanTypes.h
VulkanYcbcrConversion.h
sk_sp
Definition:
SkRefCnt.h:220
skgpu::graphite::VulkanImageView
Definition:
VulkanImageView.h:26
skgpu::graphite::VulkanImageView::usage
Usage usage() const
Definition:
VulkanImageView.h:43
skgpu::graphite::VulkanImageView::~VulkanImageView
~VulkanImageView()
Definition:
VulkanImageView.cpp:94
skgpu::graphite::VulkanImageView::Usage
Usage
Definition:
VulkanImageView.h:28
skgpu::graphite::VulkanImageView::imageView
VkImageView imageView() const
Definition:
VulkanImageView.h:42
skgpu::graphite::VulkanImageView::Make
static std::unique_ptr< const VulkanImageView > Make(const VulkanSharedContext *sharedContext, VkImage image, VkFormat format, Usage usage, uint32_t miplevels, sk_sp< VulkanYcbcrConversion >)
Definition:
VulkanImageView.cpp:17
skgpu::graphite::VulkanSharedContext
Definition:
VulkanSharedContext.h:28
format
uint32_t uint32_t * format
Definition:
fl_texture_registrar_test.cc:41
SkRecords::image
sk_sp< const SkImage > image
Definition:
SkRecords.h:269
skgpu::graphite
Definition:
BoundsManagerBench.cpp:27
VkFormat
VkFormat
Definition:
vulkan_core.h:1458
Generated on Sun Jun 23 2024 21:56:28 for Flutter Engine by
1.9.4