Flutter Engine
The Flutter Engine
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
SkSamplingOptions Struct Reference

#include <SkSamplingOptions.h>

Public Member Functions

constexpr SkSamplingOptions ()=default
 
 SkSamplingOptions (const SkSamplingOptions &)=default
 
SkSamplingOptionsoperator= (const SkSamplingOptions &that)
 
constexpr SkSamplingOptions (SkFilterMode fm, SkMipmapMode mm)
 
constexpr SkSamplingOptions (SkFilterMode fm)
 
constexpr SkSamplingOptions (const SkCubicResampler &c)
 
bool operator== (const SkSamplingOptions &other) const
 
bool operator!= (const SkSamplingOptions &other) const
 
bool isAniso () const
 

Static Public Member Functions

static constexpr SkSamplingOptions Aniso (int maxAniso)
 

Public Attributes

const int maxAniso = 0
 
const bool useCubic = false
 
const SkCubicResampler cubic = {0, 0}
 
const SkFilterMode filter = SkFilterMode::kNearest
 
const SkMipmapMode mipmap = SkMipmapMode::kNone
 

Detailed Description

Definition at line 58 of file SkSamplingOptions.h.

Constructor & Destructor Documentation

◆ SkSamplingOptions() [1/5]

constexpr SkSamplingOptions::SkSamplingOptions ( )
constexprdefault

◆ SkSamplingOptions() [2/5]

SkSamplingOptions::SkSamplingOptions ( const SkSamplingOptions )
default

◆ SkSamplingOptions() [3/5]

constexpr SkSamplingOptions::SkSamplingOptions ( SkFilterMode  fm,
SkMipmapMode  mm 
)
inlineconstexpr

Definition at line 73 of file SkSamplingOptions.h.

74 : filter(fm)
75 , mipmap(mm) {}
const SkFilterMode filter
const SkMipmapMode mipmap

◆ SkSamplingOptions() [4/5]

constexpr SkSamplingOptions::SkSamplingOptions ( SkFilterMode  fm)
inlineconstexpr

Definition at line 79 of file SkSamplingOptions.h.

◆ SkSamplingOptions() [5/5]

constexpr SkSamplingOptions::SkSamplingOptions ( const SkCubicResampler c)
inlineconstexpr

Definition at line 83 of file SkSamplingOptions.h.

84 : useCubic(true)
85 , cubic(c) {}
const SkCubicResampler cubic

Member Function Documentation

◆ Aniso()

static constexpr SkSamplingOptions SkSamplingOptions::Aniso ( int  maxAniso)
inlinestaticconstexpr

Definition at line 87 of file SkSamplingOptions.h.

87 {
89 }
static float max(float r, float g, float b)
Definition: hsl.cpp:49

◆ isAniso()

bool SkSamplingOptions::isAniso ( ) const
inline

Definition at line 101 of file SkSamplingOptions.h.

101{ return maxAniso != 0; }

◆ operator!=()

bool SkSamplingOptions::operator!= ( const SkSamplingOptions other) const
inline

Definition at line 99 of file SkSamplingOptions.h.

99{ return !(*this == other); }

◆ operator=()

SkSamplingOptions & SkSamplingOptions::operator= ( const SkSamplingOptions that)
inline

Definition at line 67 of file SkSamplingOptions.h.

67 {
68 this->~SkSamplingOptions(); // A pedantic no-op.
69 new (this) SkSamplingOptions(that);
70 return *this;
71 }
constexpr SkSamplingOptions()=default

◆ operator==()

bool SkSamplingOptions::operator== ( const SkSamplingOptions other) const
inline

Definition at line 91 of file SkSamplingOptions.h.

91 {
92 return maxAniso == other.maxAniso
93 && useCubic == other.useCubic
94 && cubic.B == other.cubic.B
95 && cubic.C == other.cubic.C
96 && filter == other.filter
97 && mipmap == other.mipmap;
98 }

Member Data Documentation

◆ cubic

const SkCubicResampler SkSamplingOptions::cubic = {0, 0}

Definition at line 61 of file SkSamplingOptions.h.

◆ filter

const SkFilterMode SkSamplingOptions::filter = SkFilterMode::kNearest

Definition at line 62 of file SkSamplingOptions.h.

◆ maxAniso

const int SkSamplingOptions::maxAniso = 0

Definition at line 59 of file SkSamplingOptions.h.

◆ mipmap

const SkMipmapMode SkSamplingOptions::mipmap = SkMipmapMode::kNone

Definition at line 63 of file SkSamplingOptions.h.

◆ useCubic

const bool SkSamplingOptions::useCubic = false

Definition at line 60 of file SkSamplingOptions.h.


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