Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
impeller::YUVConversionDescriptorVKHash Struct Reference

#include <yuv_conversion_vk.h>

Public Member Functions

std::size_t operator() (const YUVConversionDescriptorVK &object) const
 

Detailed Description

Definition at line 85 of file yuv_conversion_vk.h.

Member Function Documentation

◆ operator()()

std::size_t impeller::YUVConversionDescriptorVKHash::operator() ( const YUVConversionDescriptorVK object) const

Definition at line 41 of file yuv_conversion_vk.cc.

42 {
43 // Hashers in Vulkan HPP hash the pNext member which isn't what we want for
44 // these to be stable.
45 const auto& conv = desc.get();
46
47 std::size_t hash = fml::HashCombine(conv.format, //
48 conv.ycbcrModel, //
49 conv.ycbcrRange, //
50 conv.components.r, //
51 conv.components.g, //
52 conv.components.b, //
53 conv.components.a, //
54 conv.xChromaOffset, //
55 conv.yChromaOffset, //
56 conv.chromaFilter, //
57 conv.forceExplicitReconstruction //
58 );
59#if FML_OS_ANDROID
60 const auto external_format = desc.get<vk::ExternalFormatANDROID>();
62#endif // FML_OS_ANDROID
63
64 return hash;
65};
static uint32_t hash(const SkShaderBase::GradientInfo &v)
GLenum external_format
constexpr std::size_t HashCombine()
Definition: hash_combine.h:25
constexpr void HashCombineSeed(std::size_t &seed, Type arg)
Definition: hash_combine.h:13

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