Flutter Engine
The Flutter Engine
|
#include <SkMaskGamma.h>
Public Types | |
typedef SkTMaskPreBlend< R_LUM_BITS, G_LUM_BITS, B_LUM_BITS > | PreBlend |
Public Member Functions | |
SkTMaskGamma () | |
SkTMaskGamma (SkScalar contrast, SkScalar deviceGamma) | |
PreBlend | preBlend (SkColor color) const |
void | getGammaTableDimensions (int *tableWidth, int *numTables) const |
const uint8_t * | getGammaTables () const |
Public Member Functions inherited from SkRefCntBase | |
SkRefCntBase () | |
virtual | ~SkRefCntBase () |
bool | unique () const |
void | ref () const |
void | unref () const |
Static Public Member Functions | |
static SkColor | CanonicalColor (SkColor color) |
A regular mask contains linear alpha values. A gamma correcting mask contains non-linear alpha values in an attempt to create gamma correct blits in the presence of a gamma incorrect (linear) blend in the blitter.
SkMaskGamma creates and maintains tables which convert linear alpha values to gamma correcting alpha values.
R | The number of luminance bits to use [1, 8] from the red channel. |
G | The number of luminance bits to use [1, 8] from the green channel. |
B | The number of luminance bits to use [1, 8] from the blue channel. |
Definition at line 99 of file SkMaskGamma.h.
typedef SkTMaskPreBlend<R_LUM_BITS, G_LUM_BITS, B_LUM_BITS> SkTMaskGamma< R_LUM_BITS, G_LUM_BITS, B_LUM_BITS >::PreBlend |
The type of the mask pre-blend which will be returned from preBlend(SkColor).
Definition at line 132 of file SkMaskGamma.h.
|
inline |
Creates a linear SkTMaskGamma.
Definition at line 104 of file SkMaskGamma.h.
|
inline |
Creates tables to convert linear alpha values to gamma correcting alpha values.
contrast | A value in the range [0.0, 1.0] which indicates the amount of artificial contrast to add. |
device | The color space of the target device. |
Definition at line 114 of file SkMaskGamma.h.
|
inlinestatic |
Given a color, returns the closest canonical color.
Definition at line 124 of file SkMaskGamma.h.
|
inline |
Get dimensions for the full table set, so it can be allocated as a block.
Definition at line 144 of file SkMaskGamma.h.
|
inline |
Provides direct access to the full table set, so it can be uploaded into a texture or analyzed in other ways. Returns nullptr if fGammaTables hasn't been initialized.
Definition at line 154 of file SkMaskGamma.h.
SkTMaskPreBlend< R_LUM_BITS, G_LUM_BITS, B_LUM_BITS > SkTMaskGamma< R_LUM_BITS, G_LUM_BITS, B_LUM_BITS >::preBlend | ( | SkColor | color | ) | const |
Provides access to the tables appropriate for converting linear alpha values into gamma correcting alpha values when drawing the given color through the mask. The destination color will be approximated.
Definition at line 209 of file SkMaskGamma.h.