Flutter Engine
The Flutter Engine
VulkanYcbcrConversion.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_VulkanYcbcrConversion_DEFINED
9#define skgpu_graphite_VulkanYcbcrConversion_DEFINED
10
12
14#include "src/core/SkChecksum.h"
15
16#include <cinttypes>
17
18namespace skgpu {
19struct VulkanYcbcrConversionInfo;
20}
21
22namespace skgpu::graphite {
23
24class VulkanSharedContext;
25
27public:
30
32 uint32_t nonFormatInfo,
33 uint64_t format);
34
37
38 // Return a fully-formed GraphiteResourceKey that represents a YCbCr conversion by extracting
39 // relevant information from a SamplerDesc.
40 static GraphiteResourceKey GetKeyFromSamplerDesc(const SamplerDesc& samplerDesc);
41
42 VkSamplerYcbcrConversion ycbcrConversion() const { return fYcbcrConversion; }
43
44 const char* getResourceType() const override { return "Vulkan YCbCr Conversion"; }
45
46private:
47 VulkanYcbcrConversion(const VulkanSharedContext*, VkSamplerYcbcrConversion);
48
49 void freeGpuData() override;
50
51 VkSamplerYcbcrConversion fYcbcrConversion;
52};
53} // namespace skgpu::graphite
54
55#endif // skgpu_graphite_VulkanYcbcrConversion_DEFINED
56
static GraphiteResourceKey GetKeyFromSamplerDesc(const SamplerDesc &samplerDesc)
VkSamplerYcbcrConversion ycbcrConversion() const
static sk_sp< VulkanYcbcrConversion > Make(const VulkanSharedContext *, const VulkanYcbcrConversionInfo &)
const char * getResourceType() const override
static GraphiteResourceKey MakeYcbcrConversionKey(const VulkanSharedContext *, const VulkanYcbcrConversionInfo &)
uint32_t uint32_t * format
Definition: GpuTools.h:21