Flutter Impeller
impeller::ImmutableSamplerKeyVK Struct Reference

#include <yuv_conversion_vk.h>

Inheritance diagram for impeller::ImmutableSamplerKeyVK:
impeller::Comparable< ImmutableSamplerKeyVK > impeller::ComparableBase

Public Member Functions

 ImmutableSamplerKeyVK (const SamplerVK &sampler)
 
std::size_t GetHash () const override
 
bool IsEqual (const ImmutableSamplerKeyVK &other) const override
 
- Public Member Functions inherited from impeller::Comparable< ImmutableSamplerKeyVK >
virtual std::size_t GetHash () const=0
 

Public Attributes

SamplerDescriptor sampler
 
YUVConversionDescriptorVK yuv_conversion
 

Detailed Description

Definition at line 94 of file yuv_conversion_vk.h.

Constructor & Destructor Documentation

◆ ImmutableSamplerKeyVK()

impeller::ImmutableSamplerKeyVK::ImmutableSamplerKeyVK ( const SamplerVK sampler)
explicit

Definition at line 102 of file yuv_conversion_vk.cc.

103  : sampler(sampler.GetDescriptor()) {
104  if (const auto& conversion = sampler.GetYUVConversion()) {
105  yuv_conversion = conversion->GetDescriptor();
106  }
107 }

References sampler, and yuv_conversion.

Member Function Documentation

◆ GetHash()

std::size_t impeller::ImmutableSamplerKeyVK::GetHash ( ) const
override

Definition at line 114 of file yuv_conversion_vk.cc.

114  {
115  return fml::HashCombine(sampler.GetHash(),
116  YUVConversionDescriptorVKHash{}(yuv_conversion));
117 }

References impeller::SamplerDescriptor::GetHash(), sampler, and yuv_conversion.

◆ IsEqual()

bool impeller::ImmutableSamplerKeyVK::IsEqual ( const ImmutableSamplerKeyVK other) const
overridevirtual

Implements impeller::Comparable< ImmutableSamplerKeyVK >.

Definition at line 109 of file yuv_conversion_vk.cc.

109  {
110  return sampler.IsEqual(other.sampler) &&
111  YUVConversionDescriptorVKEqual{}(yuv_conversion, other.yuv_conversion);
112 }

References impeller::SamplerDescriptor::IsEqual(), sampler, and yuv_conversion.

Member Data Documentation

◆ sampler

SamplerDescriptor impeller::ImmutableSamplerKeyVK::sampler

Definition at line 95 of file yuv_conversion_vk.h.

Referenced by GetHash(), ImmutableSamplerKeyVK(), and IsEqual().

◆ yuv_conversion

YUVConversionDescriptorVK impeller::ImmutableSamplerKeyVK::yuv_conversion

Definition at line 96 of file yuv_conversion_vk.h.

Referenced by GetHash(), ImmutableSamplerKeyVK(), and IsEqual().


The documentation for this struct was generated from the following files:
impeller::SamplerDescriptor::GetHash
std::size_t GetHash() const override
Definition: sampler_descriptor.h:34
impeller::ImmutableSamplerKeyVK::yuv_conversion
YUVConversionDescriptorVK yuv_conversion
Definition: yuv_conversion_vk.h:96
impeller::ImmutableSamplerKeyVK::sampler
SamplerDescriptor sampler
Definition: yuv_conversion_vk.h:95
impeller::SamplerDescriptor::IsEqual
bool IsEqual(const SamplerDescriptor &o) const override
Definition: sampler_descriptor.h:41