Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
VulkanGraphiteTypes.h
Go to the documentation of this file.
1/*
2 * Copyright 2022 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_VulkanGraphiteTypes_DEFINED
9#define skgpu_graphite_VulkanGraphiteTypes_DEFINED
10
13
14namespace skgpu::graphite {
15
17 uint32_t fSampleCount = 1;
18 Mipmapped fMipmapped = Mipmapped::kNo;
19
20 // VkImageCreateInfo properties
21 // Currently the only supported flag is VK_IMAGE_CREATE_PROTECTED_BIT. Any other flag will not
22 // be accepted
28
29 // Properties related to the image view and sampling. These are less inherent properties of the
30 // VkImage but describe how the VkImage should be used within Skia.
31
32 // What aspect to use for the VkImageView. The normal, default is VK_IMAGE_ASPECT_COLOR_BIT.
33 // However, if the VkImage is a Ycbcr format, the client can pass a specific plan here to have
34 // Skia directly sample a plane. In that case the client should also pass in a VkFormat that is
35 // compatible with the plane as described by the Vulkan spec.
38
39 VulkanTextureInfo() = default;
40 VulkanTextureInfo(uint32_t sampleCount,
41 Mipmapped mipmapped,
44 VkImageTiling imageTiling,
45 VkImageUsageFlags imageUsageFlags,
46 VkSharingMode sharingMode,
47 VkImageAspectFlags aspectMask,
48 VulkanYcbcrConversionInfo ycbcrConversionInfo)
49 : fSampleCount(sampleCount)
50 , fMipmapped(mipmapped)
51 , fFlags(flags)
53 , fImageTiling(imageTiling)
54 , fImageUsageFlags(imageUsageFlags)
55 , fSharingMode(sharingMode)
56 , fAspectMask(aspectMask)
57 , fYcbcrConversionInfo(ycbcrConversionInfo) {}
58};
59
60} // namespace skgpu::graphite
61
62#endif // skgpu_graphite_VulkanGraphiteTypes_DEFINED
63
64
FlutterSemanticsFlag flags
uint32_t uint32_t * format
Mipmapped
Definition GpuTypes.h:53
VulkanYcbcrConversionInfo fYcbcrConversionInfo
VulkanTextureInfo(uint32_t sampleCount, Mipmapped mipmapped, VkImageCreateFlags flags, VkFormat format, VkImageTiling imageTiling, VkImageUsageFlags imageUsageFlags, VkSharingMode sharingMode, VkImageAspectFlags aspectMask, VulkanYcbcrConversionInfo ycbcrConversionInfo)
VkSharingMode
@ VK_SHARING_MODE_EXCLUSIVE
VkFlags VkImageAspectFlags
VkFlags VkImageUsageFlags
VkImageTiling
@ VK_IMAGE_TILING_OPTIMAL
@ VK_IMAGE_ASPECT_COLOR_BIT
VkFlags VkImageCreateFlags
VkFormat
@ VK_FORMAT_UNDEFINED