Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Friends | List of all members
SkTMaskPreBlend< R_LUM_BITS, G_LUM_BITS, B_LUM_BITS > Class Template Reference

#include <SkMaskGamma.h>

Public Member Functions

 SkTMaskPreBlend ()
 
 SkTMaskPreBlend (const SkTMaskPreBlend< R_LUM_BITS, G_LUM_BITS, B_LUM_BITS > &that)
 
 ~SkTMaskPreBlend ()
 
bool isApplicable () const
 

Public Attributes

const uint8_t * fR
 
const uint8_t * fG
 
const uint8_t * fB
 

Friends

class SkTMaskGamma< R_LUM_BITS, G_LUM_BITS, B_LUM_BITS >
 

Detailed Description

template<int R_LUM_BITS, int G_LUM_BITS, int B_LUM_BITS>
class SkTMaskPreBlend< R_LUM_BITS, G_LUM_BITS, B_LUM_BITS >

SkTMaskPreBlend is a tear-off of SkTMaskGamma. It provides the tables to convert a linear alpha value for a given channel to a gamma correcting alpha value for that channel. This class is immutable.

If fR, fG, or fB is nullptr, all of them will be. This indicates that no mask pre blend should be applied. SkTMaskPreBlend::isApplicable() is provided as a convenience function to test for the absence of this case.

Definition at line 182 of file SkMaskGamma.h.

Constructor & Destructor Documentation

◆ SkTMaskPreBlend() [1/2]

template<int R_LUM_BITS, int G_LUM_BITS, int B_LUM_BITS>
SkTMaskPreBlend< R_LUM_BITS, G_LUM_BITS, B_LUM_BITS >::SkTMaskPreBlend ( )
inline

Creates a non applicable SkTMaskPreBlend.

Definition at line 192 of file SkMaskGamma.h.

192: fParent(), fR(nullptr), fG(nullptr), fB(nullptr) { }
const uint8_t * fG
const uint8_t * fB
const uint8_t * fR

◆ SkTMaskPreBlend() [2/2]

template<int R_LUM_BITS, int G_LUM_BITS, int B_LUM_BITS>
SkTMaskPreBlend< R_LUM_BITS, G_LUM_BITS, B_LUM_BITS >::SkTMaskPreBlend ( const SkTMaskPreBlend< R_LUM_BITS, G_LUM_BITS, B_LUM_BITS > &  that)
inline

This copy contructor exists for correctness, but should never be called when return value optimization is enabled.

Definition at line 198 of file SkMaskGamma.h.

199 : fParent(that.fParent), fR(that.fR), fG(that.fG), fB(that.fB) { }

◆ ~SkTMaskPreBlend()

template<int R_LUM_BITS, int G_LUM_BITS, int B_LUM_BITS>
SkTMaskPreBlend< R_LUM_BITS, G_LUM_BITS, B_LUM_BITS >::~SkTMaskPreBlend ( )
inline

Definition at line 201 of file SkMaskGamma.h.

201{ }

Member Function Documentation

◆ isApplicable()

template<int R_LUM_BITS, int G_LUM_BITS, int B_LUM_BITS>
bool SkTMaskPreBlend< R_LUM_BITS, G_LUM_BITS, B_LUM_BITS >::isApplicable ( ) const
inline

True if this PreBlend should be applied. When false, fR, fG, and fB are nullptr.

Definition at line 204 of file SkMaskGamma.h.

204{ return SkToBool(this->fG); }
static constexpr bool SkToBool(const T &x)
Definition SkTo.h:35

Friends And Related Symbol Documentation

◆ SkTMaskGamma< R_LUM_BITS, G_LUM_BITS, B_LUM_BITS >

template<int R_LUM_BITS, int G_LUM_BITS, int B_LUM_BITS>
friend class SkTMaskGamma< R_LUM_BITS, G_LUM_BITS, B_LUM_BITS >
friend

Definition at line 188 of file SkMaskGamma.h.

Member Data Documentation

◆ fB

template<int R_LUM_BITS, int G_LUM_BITS, int B_LUM_BITS>
const uint8_t* SkTMaskPreBlend< R_LUM_BITS, G_LUM_BITS, B_LUM_BITS >::fB

Definition at line 208 of file SkMaskGamma.h.

◆ fG

template<int R_LUM_BITS, int G_LUM_BITS, int B_LUM_BITS>
const uint8_t* SkTMaskPreBlend< R_LUM_BITS, G_LUM_BITS, B_LUM_BITS >::fG

Definition at line 207 of file SkMaskGamma.h.

◆ fR

template<int R_LUM_BITS, int G_LUM_BITS, int B_LUM_BITS>
const uint8_t* SkTMaskPreBlend< R_LUM_BITS, G_LUM_BITS, B_LUM_BITS >::fR

Definition at line 206 of file SkMaskGamma.h.


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