| 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 18 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 37 of file sampler_descriptor.h.

37 {
38 return fml::HashCombine(min_filter, mag_filter, mip_filter,
39 width_address_mode, height_address_mode,
40 depth_address_mode);
41 }

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

## ◆ IsEqual()

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

Implements impeller::Comparable< SamplerDescriptor >.

Definition at line 44 of file sampler_descriptor.h.

44 {
45 return min_filter == o.min_filter && mag_filter == o.mag_filter &&
46 mip_filter == o.mip_filter &&
47 width_address_mode == o.width_address_mode &&
48 height_address_mode == o.height_address_mode &&
49 depth_address_mode == o.depth_address_mode;
50 }

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

## Member Data Documentation

## ◆ depth_address_mode

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

Definition at line 25 of file sampler_descriptor.h.

Referenced by GetHash(), and IsEqual().

## ◆ height_address_mode

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

Definition at line 24 of file sampler_descriptor.h.

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

## ◆ label

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

Definition at line 27 of file sampler_descriptor.h.

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

## ◆ mag_filter

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

Definition at line 20 of file sampler_descriptor.h.

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

## ◆ min_filter

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

Definition at line 19 of file sampler_descriptor.h.

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

## ◆ mip_filter

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

Definition at line 21 of file sampler_descriptor.h.

Referenced by impeller::scene::UnlitMaterial::BindToCommand(), impeller::scene::SkinnedVertexBufferGeometry::BindToCommand(), 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 23 of file sampler_descriptor.h.

Referenced by impeller::scene::SkinnedVertexBufferGeometry::BindToCommand(), GetHash(), IsEqual(), 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:20
impeller::SamplerDescriptor::min_filter
MinMagFilter min_filter
Definition: sampler_descriptor.h:19
impeller::SamplerDescriptor::width_address_mode
SamplerAddressMode width_address_mode
Definition: sampler_descriptor.h:23
impeller::SamplerDescriptor::depth_address_mode
SamplerAddressMode depth_address_mode
Definition: sampler_descriptor.h:25
impeller::SamplerDescriptor::mip_filter
MipFilter mip_filter
Definition: sampler_descriptor.h:21
impeller::SamplerDescriptor::label
std::string label
Definition: sampler_descriptor.h:27
impeller::SamplerDescriptor::height_address_mode
SamplerAddressMode height_address_mode
Definition: sampler_descriptor.h:24