Flutter Impeller
impeller::YUVConversionDescriptorVKEqual Struct Reference

#include <yuv_conversion_vk.h>

Public Member Functions

bool operator() (const YUVConversionDescriptorVK &lhs, const YUVConversionDescriptorVK &rhs) const
 

Detailed Description

Definition at line 89 of file yuv_conversion_vk.h.

Member Function Documentation

◆ operator()()

bool impeller::YUVConversionDescriptorVKEqual::operator() ( const YUVConversionDescriptorVK lhs,
const YUVConversionDescriptorVK rhs 
) const

Definition at line 68 of file yuv_conversion_vk.cc.

70  {
71  // Default equality checks in Vulkan HPP checks pNext member members by
72  // pointer which isn't what we want.
73  {
74  const auto& lhs = lhs_desc.get();
75  const auto& rhs = rhs_desc.get();
76 
77  if (lhs.format != rhs.format || //
78  lhs.ycbcrModel != rhs.ycbcrModel || //
79  lhs.ycbcrRange != rhs.ycbcrRange || //
80  lhs.components.r != rhs.components.r || //
81  lhs.components.g != rhs.components.g || //
82  lhs.components.b != rhs.components.b || //
83  lhs.components.a != rhs.components.a || //
84  lhs.xChromaOffset != rhs.xChromaOffset || //
85  lhs.yChromaOffset != rhs.yChromaOffset || //
86  lhs.chromaFilter != rhs.chromaFilter || //
87  lhs.forceExplicitReconstruction != rhs.forceExplicitReconstruction //
88  ) {
89  return false;
90  }
91  }
92 #if FML_OS_ANDROID
93  {
94  const auto lhs = lhs_desc.get<vk::ExternalFormatANDROID>();
95  const auto rhs = rhs_desc.get<vk::ExternalFormatANDROID>();
96  return lhs.externalFormat == rhs.externalFormat;
97  }
98 #else // FML_OS_ANDROID
99  return true;
100 #endif // FML_OS_ANDROID
101 }

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