| Flutter Impeller |

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

`#include <sampler_descriptor.h>`

## Public Member Functions
| SamplerDescriptor ()
| SamplerDescriptor (std::string_view label, MinMagFilter min_filter, MinMagFilter mag_filter, MipFilter mip_filter)

## Static Public Member Functions
static uint64_t | ToKey (const SamplerDescriptor &d)

## 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_view | label = "NN Clamp Sampler"

## Detailed Description

Definition at line 14 of file sampler_descriptor.h.

## Constructor & Destructor Documentation

## ◆ SamplerDescriptor() [1/2]

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

## ◆ SamplerDescriptor() [2/2]

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

Definition at line 11 of file sampler_descriptor.cc.

15 : min_filter(min_filter),
16 mag_filter(mag_filter),
17 mip_filter(mip_filter),
18 label(label) {}
impeller::SamplerDescriptor::mip_filter
MipFilter mip_filter
Definition: sampler_descriptor.h:17
impeller::SamplerDescriptor::mag_filter
MinMagFilter mag_filter
Definition: sampler_descriptor.h:16
impeller::SamplerDescriptor::label
std::string_view label
Definition: sampler_descriptor.h:23
impeller::SamplerDescriptor::min_filter
MinMagFilter min_filter
Definition: sampler_descriptor.h:15

## Member Function Documentation

## ◆ ToKey()

static uint64_t impeller::SamplerDescriptor::ToKey | ( | const SamplerDescriptor & | d | ) |
| inline static

Definition at line 32 of file sampler_descriptor.h.

32 {
33 static_assert(sizeof(MinMagFilter) == 1);
34 static_assert(sizeof(MipFilter) == 1);
35 static_assert(sizeof(SamplerAddressMode) == 1);
36
37 return static_cast<uint64_t>(d.min_filter) << 0 |
38 static_cast<uint64_t>(d.mag_filter) << 8 |
39 static_cast<uint64_t>(d.mip_filter) << 16 |
40 static_cast<uint64_t>(d.width_address_mode) << 24 |
41 static_cast<uint64_t>(d.height_address_mode) << 32 |
42 static_cast<uint64_t>(d.depth_address_mode) << 40;
43 }
impeller::SamplerAddressMode
SamplerAddressMode
Definition: formats.h:441
impeller::MipFilter
MipFilter
Options for selecting and filtering between mipmap levels.
Definition: formats.h:425
impeller::MinMagFilter
MinMagFilter
Describes how the texture should be sampled when the texture is being shrunk (minified) or expanded (...
Definition: formats.h:415

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

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

## Member Data Documentation

## ◆ depth_address_mode

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

Definition at line 21 of file sampler_descriptor.h.

Referenced by impeller::CreateSampler(), and ToKey().

## ◆ height_address_mode

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

Definition at line 20 of file sampler_descriptor.h.

Referenced by impeller::SamplerGLES::ConfigureBoundTexture(), impeller::CreateSampler(), impeller::TextureContents::Render(), impeller::TiledTextureContents::Render(), impeller::testing::TEST_P(), and ToKey().

## ◆ label

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

Definition at line 23 of file sampler_descriptor.h.

Referenced by impeller::CreateSampler(), impeller::ToSamplerDescriptor(), and impeller::skia_conversions::ToSamplerDescriptor().

## ◆ mag_filter

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

Definition at line 16 of file sampler_descriptor.h.

Referenced by impeller::SamplerGLES::ConfigureBoundTexture(), impeller::CreateSampler(), impeller::LineContents::Render(), impeller::TextContents::Render(), impeller::TextureContents::Render(), impeller::TiledTextureContents::Render(), ToKey(), impeller::ToSamplerDescriptor(), and impeller::skia_conversions::ToSamplerDescriptor().

## ◆ min_filter

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

Definition at line 15 of file sampler_descriptor.h.

Referenced by impeller::SamplerGLES::ConfigureBoundTexture(), impeller::CreateSampler(), impeller::LineContents::Render(), impeller::TextContents::Render(), impeller::TextureContents::Render(), impeller::TiledTextureContents::Render(), impeller::testing::TEST_P(), ToKey(), impeller::ToSamplerDescriptor(), and impeller::skia_conversions::ToSamplerDescriptor().

## ◆ mip_filter

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

Definition at line 17 of file sampler_descriptor.h.

Referenced by impeller::SamplerGLES::ConfigureBoundTexture(), impeller::CreateSampler(), impeller::TextContents::Render(), impeller::TextureContents::Render(), impeller::TiledTextureContents::Render(), impeller::testing::TEST_P(), ToKey(), and impeller::skia_conversions::ToSamplerDescriptor().

## ◆ width_address_mode

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

Definition at line 19 of file sampler_descriptor.h.

Referenced by impeller::SamplerGLES::ConfigureBoundTexture(), impeller::CreateSampler(), impeller::TextureContents::Render(), impeller::TiledTextureContents::Render(), impeller::VerticesSimpleBlendContents::Render(), impeller::testing::TEST_P(), and ToKey().

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

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