Flutter Engine
The Flutter Engine
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;
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
Definition: vulkan_core.h:1812
@ VK_SHARING_MODE_EXCLUSIVE
Definition: vulkan_core.h:1813
VkFlags VkImageAspectFlags
Definition: vulkan_core.h:2256
VkFlags VkImageUsageFlags
Definition: vulkan_core.h:2382
VkImageTiling
Definition: vulkan_core.h:1766
@ VK_IMAGE_TILING_OPTIMAL
Definition: vulkan_core.h:1767
@ VK_IMAGE_ASPECT_COLOR_BIT
Definition: vulkan_core.h:2238
VkFlags VkImageCreateFlags
Definition: vulkan_core.h:2337
VkFormat
Definition: vulkan_core.h:1458
@ VK_FORMAT_UNDEFINED
Definition: vulkan_core.h:1459