Flutter Engine
The Flutter Engine
VulkanGraphiteTypesPriv.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_VulkanGraphiteTypesPriv_DEFINED
9#define skgpu_graphite_VulkanGraphiteTypesPriv_DEFINED
10
14
15namespace skgpu::graphite {
16
19 : fFlags(0)
34
35 bool operator==(const VulkanTextureSpec& that) const {
36 return fFlags == that.fFlags &&
37 fFormat == that.fFormat &&
38 fImageTiling == that.fImageTiling &&
40 fSharingMode == that.fSharingMode &&
41 fAspectMask == that.fAspectMask &&
43 }
44
45 bool isCompatible(const VulkanTextureSpec& that) const {
46 // The usages may match or the usage passed in may be a superset of the usage stored within.
47 return fFlags == that.fFlags &&
48 fFormat == that.fFormat &&
49 fImageTiling == that.fImageTiling &&
50 fSharingMode == that.fSharingMode &&
51 fAspectMask == that.fAspectMask &&
54 }
55
57 return SkStringPrintf(
58 "flags=0x%08X,format=%d,imageTiling=%d,imageUsageFlags=0x%08X,sharingMode=%d,"
59 "aspectMask=%u",
60 fFlags,
61 fFormat,
66 }
67
75};
76
78 uint32_t sampleCount,
79 Mipmapped mipmapped);
80
81} // namespace skgpu::graphite
82
83#endif // skgpu_graphite_VulkanGraphiteTypesPriv_DEFINED
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
Definition: DM.cpp:213
SK_API SkString SkStringPrintf(const char *format,...) SK_PRINTF_LIKE(1
Creates a new string and writes into it using a printf()-style format.
VulkanTextureInfo VulkanTextureSpecToTextureInfo(const VulkanTextureSpec &vkSpec, uint32_t sampleCount, Mipmapped mipmapped)
Mipmapped
Definition: GpuTypes.h:53
bool isCompatible(const VulkanTextureSpec &that) const
VulkanTextureSpec(const VulkanTextureInfo &info)
bool operator==(const VulkanTextureSpec &that) const
VulkanYcbcrConversionInfo fYcbcrConversionInfo
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