Flutter Engine
The Flutter Engine
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 178 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 188 of file SkMaskGamma.h.

188: fParent(), fR(nullptr), fG(nullptr), fB(nullptr) { }
const uint8_t * fG
Definition: SkMaskGamma.h:203
const uint8_t * fB
Definition: SkMaskGamma.h:204
const uint8_t * fR
Definition: SkMaskGamma.h:202

◆ 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 194 of file SkMaskGamma.h.

195 : 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 197 of file SkMaskGamma.h.

197{ }

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 200 of file SkMaskGamma.h.

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

Friends And Related Function 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 184 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 204 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 203 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 202 of file SkMaskGamma.h.


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