Flutter Engine
The Flutter Engine
Public Member Functions | Public Attributes | List of all members
skgpu::VulkanYcbcrConversionInfo Struct Reference

#include <VulkanTypes.h>

Public Member Functions

bool operator== (const VulkanYcbcrConversionInfo &that) const
 
bool operator!= (const VulkanYcbcrConversionInfo &that) const
 
bool isValid () const
 

Public Attributes

VkFormat fFormat = VK_FORMAT_UNDEFINED
 
uint64_t fExternalFormat = 0
 
VkSamplerYcbcrModelConversion fYcbcrModel = VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY
 
VkSamplerYcbcrRange fYcbcrRange = VK_SAMPLER_YCBCR_RANGE_ITU_FULL
 
VkChromaLocation fXChromaOffset = VK_CHROMA_LOCATION_COSITED_EVEN
 
VkChromaLocation fYChromaOffset = VK_CHROMA_LOCATION_COSITED_EVEN
 
VkFilter fChromaFilter = VK_FILTER_NEAREST
 
VkBool32 fForceExplicitReconstruction = false
 
VkFormatFeatureFlags fFormatFeatures = 0
 
VkComponentMapping fComponents
 

Detailed Description

Definition at line 63 of file VulkanTypes.h.

Member Function Documentation

◆ isValid()

bool skgpu::VulkanYcbcrConversionInfo::isValid ( ) const
inline

Definition at line 90 of file VulkanTypes.h.

90 {
92 fExternalFormat != 0;
93 }
VkSamplerYcbcrModelConversion fYcbcrModel
Definition: VulkanTypes.h:103
@ VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY
Definition: vulkan_core.h:4946

◆ operator!=()

bool skgpu::VulkanYcbcrConversionInfo::operator!= ( const VulkanYcbcrConversionInfo that) const
inline

Definition at line 88 of file VulkanTypes.h.

88{ return !(*this == that); }

◆ operator==()

bool skgpu::VulkanYcbcrConversionInfo::operator== ( const VulkanYcbcrConversionInfo that) const
inline

Definition at line 64 of file VulkanTypes.h.

64 {
65 // Invalid objects are not required to have all other fields initialized or matching.
66 if (!this->isValid() && !that.isValid()) {
67 return true;
68 }
69
70 // Note that we do not need to check for fFormatFeatures equality. This is because the
71 // Vulkan spec dictates that Android hardware buffers with the same external format must
72 // have the same support for key features. See
73 // https://docs.vulkan.org/spec/latest/chapters/memory.html#_android_hardware_buffer_external_memory
74 // for more details.
75 return this->fFormat == that.fFormat &&
76 this->fExternalFormat == that.fExternalFormat &&
77 this->fYcbcrModel == that.fYcbcrModel &&
78 this->fYcbcrRange == that.fYcbcrRange &&
79 this->fXChromaOffset == that.fXChromaOffset &&
80 this->fYChromaOffset == that.fYChromaOffset &&
81 this->fChromaFilter == that.fChromaFilter &&
82 this->fForceExplicitReconstruction == that.fForceExplicitReconstruction &&
83 this->fComponents.r == that.fComponents.r &&
84 this->fComponents.g == that.fComponents.g &&
85 this->fComponents.b == that.fComponents.b &&
86 this->fComponents.a == that.fComponents.a;
87 }
VkComponentSwizzle r
Definition: vulkan_core.h:3460
VkComponentSwizzle a
Definition: vulkan_core.h:3463
VkComponentSwizzle g
Definition: vulkan_core.h:3461
VkComponentSwizzle b
Definition: vulkan_core.h:3462
VkSamplerYcbcrRange fYcbcrRange
Definition: VulkanTypes.h:104
VkComponentMapping fComponents
Definition: VulkanTypes.h:115

Member Data Documentation

◆ fChromaFilter

VkFilter skgpu::VulkanYcbcrConversionInfo::fChromaFilter = VK_FILTER_NEAREST

Definition at line 107 of file VulkanTypes.h.

◆ fComponents

VkComponentMapping skgpu::VulkanYcbcrConversionInfo::fComponents

◆ fExternalFormat

uint64_t skgpu::VulkanYcbcrConversionInfo::fExternalFormat = 0

Definition at line 101 of file VulkanTypes.h.

◆ fForceExplicitReconstruction

VkBool32 skgpu::VulkanYcbcrConversionInfo::fForceExplicitReconstruction = false

Definition at line 108 of file VulkanTypes.h.

◆ fFormat

VkFormat skgpu::VulkanYcbcrConversionInfo::fFormat = VK_FORMAT_UNDEFINED

Definition at line 97 of file VulkanTypes.h.

◆ fFormatFeatures

VkFormatFeatureFlags skgpu::VulkanYcbcrConversionInfo::fFormatFeatures = 0

Definition at line 112 of file VulkanTypes.h.

◆ fXChromaOffset

VkChromaLocation skgpu::VulkanYcbcrConversionInfo::fXChromaOffset = VK_CHROMA_LOCATION_COSITED_EVEN

Definition at line 105 of file VulkanTypes.h.

◆ fYcbcrModel

VkSamplerYcbcrModelConversion skgpu::VulkanYcbcrConversionInfo::fYcbcrModel = VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY

Definition at line 103 of file VulkanTypes.h.

◆ fYcbcrRange

VkSamplerYcbcrRange skgpu::VulkanYcbcrConversionInfo::fYcbcrRange = VK_SAMPLER_YCBCR_RANGE_ITU_FULL

Definition at line 104 of file VulkanTypes.h.

◆ fYChromaOffset

VkChromaLocation skgpu::VulkanYcbcrConversionInfo::fYChromaOffset = VK_CHROMA_LOCATION_COSITED_EVEN

Definition at line 106 of file VulkanTypes.h.


The documentation for this struct was generated from the following file: