| Flutter Impeller |

Public Member Functions | Public Attributes | List of all members
impeller::SamplerDescriptor Struct Referencefinal

`#include <sampler_descriptor.h>`

Inheritance diagram for impeller::SamplerDescriptor:

## Public Member Functions
| SamplerDescriptor ()
| SamplerDescriptor (std::string label, MinMagFilter min_filter, MinMagFilter mag_filter, MipFilter mip_filter)
std::size_t | GetHash () const override
bool | IsEqual (const SamplerDescriptor &o) const override
Public Member Functions inherited from impeller::Comparable< SamplerDescriptor >
virtual std::size_t | GetHash () const=0

## Public Attributes
MinMagFilter | min_filter = MinMagFilter::kNearest
MinMagFilter | mag_filter = MinMagFilter::kNearest
MipFilter | mip_filter = MipFilter::kNearest
SamplerAddressMode | width_address_mode = SamplerAddressMode::kClampToEdge
SamplerAddressMode | height_address_mode = SamplerAddressMode::kClampToEdge
SamplerAddressMode | depth_address_mode = SamplerAddressMode::kClampToEdge
std::string | label = "NN Clamp Sampler"

## Detailed Description

Definition at line 15 of file sampler_descriptor.h.

## Constructor & Destructor Documentation

## ◆ SamplerDescriptor() [1/2]

impeller::SamplerDescriptor::SamplerDescriptor | ( |  | ) |
| default

## ◆ SamplerDescriptor() [2/2]

impeller::SamplerDescriptor::SamplerDescriptor | ( | std::string | label,
|  | MinMagFilter | min_filter,
|  | MinMagFilter | mag_filter,
|  | MipFilter | mip_filter
| ) |  |

Definition at line 13 of file sampler_descriptor.cc.

17 : min_filter(min_filter),
18 mag_filter(mag_filter),
19 mip_filter(mip_filter),
20 label(std::move(label)) {}

## Member Function Documentation

## ◆ GetHash()

std::size_t impeller::SamplerDescriptor::GetHash | ( |  | ) | const
| inline override

Definition at line 34 of file sampler_descriptor.h.

34 {
35 return fml::HashCombine(min_filter, mag_filter, mip_filter,
36 width_address_mode, height_address_mode,
37 depth_address_mode);
38 }

References depth_address_mode, height_address_mode, mag_filter, min_filter, mip_filter, and width_address_mode.

Referenced by impeller::ImmutableSamplerKeyVK::GetHash().

## ◆ IsEqual()

bool impeller::SamplerDescriptor::IsEqual | ( | const SamplerDescriptor & | o | ) | const
| inline override virtual

Implements impeller::Comparable< SamplerDescriptor >.

Definition at line 41 of file sampler_descriptor.h.

41 {
42 return min_filter == o.min_filter && mag_filter == o.mag_filter &&
43 mip_filter == o.mip_filter &&
44 width_address_mode == o.width_address_mode &&
45 height_address_mode == o.height_address_mode &&
46 depth_address_mode == o.depth_address_mode;
47 }

References depth_address_mode, height_address_mode, mag_filter, min_filter, mip_filter, and width_address_mode.

Referenced by impeller::ImmutableSamplerKeyVK::IsEqual().

## Member Data Documentation

## ◆ depth_address_mode

SamplerAddressMode impeller::SamplerDescriptor::depth_address_mode = SamplerAddressMode::kClampToEdge

Definition at line 22 of file sampler_descriptor.h.

Referenced by impeller::CreateSampler(), GetHash(), and IsEqual().

## ◆ height_address_mode

SamplerAddressMode impeller::SamplerDescriptor::height_address_mode = SamplerAddressMode::kClampToEdge

Definition at line 21 of file sampler_descriptor.h.

Referenced by impeller::CreateSampler(), GetHash(), IsEqual(), impeller::TiledTextureContents::Render(), and impeller::testing::TEST_P().

## ◆ label

std::string impeller::SamplerDescriptor::label = "NN Clamp Sampler"

Definition at line 24 of file sampler_descriptor.h.

Referenced by impeller::scene::UnlitMaterial::BindToCommand(), impeller::scene::SkinnedVertexBufferGeometry::BindToCommand(), impeller::CreateSampler(), and impeller::ToSamplerDescriptor().

## ◆ mag_filter

MinMagFilter impeller::SamplerDescriptor::mag_filter = MinMagFilter::kNearest

Definition at line 17 of file sampler_descriptor.h.

Referenced by impeller::scene::UnlitMaterial::BindToCommand(), impeller::scene::SkinnedVertexBufferGeometry::BindToCommand(), impeller::CreateSampler(), GetHash(), IsEqual(), impeller::TextContents::Render(), and impeller::ToSamplerDescriptor().

## ◆ min_filter

MinMagFilter impeller::SamplerDescriptor::min_filter = MinMagFilter::kNearest

Definition at line 16 of file sampler_descriptor.h.

Referenced by impeller::scene::UnlitMaterial::BindToCommand(), impeller::scene::SkinnedVertexBufferGeometry::BindToCommand(), impeller::CreateSampler(), GetHash(), IsEqual(), impeller::TextContents::Render(), impeller::testing::TEST_P(), and impeller::ToSamplerDescriptor().

## ◆ mip_filter

MipFilter impeller::SamplerDescriptor::mip_filter = MipFilter::kNearest

Definition at line 18 of file sampler_descriptor.h.

Referenced by impeller::scene::UnlitMaterial::BindToCommand(), impeller::scene::SkinnedVertexBufferGeometry::BindToCommand(), impeller::CreateSampler(), GetHash(), IsEqual(), impeller::TextContents::Render(), impeller::testing::TEST_P(), and impeller::ToSamplerDescriptor().

## ◆ width_address_mode

SamplerAddressMode impeller::SamplerDescriptor::width_address_mode = SamplerAddressMode::kClampToEdge

Definition at line 20 of file sampler_descriptor.h.

Referenced by impeller::scene::SkinnedVertexBufferGeometry::BindToCommand(), impeller::CreateSampler(), GetHash(), IsEqual(), impeller::TiledTextureContents::Render(), impeller::VerticesSimpleBlendContents::Render(), impeller::AtlasContents::Render(), and impeller::testing::TEST_P().

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

- impeller/core/sampler_descriptor.h
- impeller/core/sampler_descriptor.cc

impeller::SamplerDescriptor::mag_filter
MinMagFilter mag_filter
Definition: sampler_descriptor.h:17
impeller::SamplerDescriptor::min_filter
MinMagFilter min_filter
Definition: sampler_descriptor.h:16
impeller::SamplerDescriptor::width_address_mode
SamplerAddressMode width_address_mode
Definition: sampler_descriptor.h:20
impeller::SamplerDescriptor::depth_address_mode
SamplerAddressMode depth_address_mode
Definition: sampler_descriptor.h:22
impeller::SamplerDescriptor::mip_filter
MipFilter mip_filter
Definition: sampler_descriptor.h:18
impeller::SamplerDescriptor::label
std::string label
Definition: sampler_descriptor.h:24
impeller::SamplerDescriptor::height_address_mode
SamplerAddressMode height_address_mode
Definition: sampler_descriptor.h:21