Skia
2D Graphics Library
SkColorTable Class Reference

SkColorTable holds the lookup tables for each channel (ARGB) used to define the filter behavior of SkColorFilters::Table, and provides a way to share the table data between client code and the returned SkColorFilter. More...

#include <SkColorTable.h>

Inheritance diagram for SkColorTable:

Public Member Functions

const uint8_t * alphaTable () const
 
const uint8_t * redTable () const
 
const uint8_t * greenTable () const
 
const uint8_t * blueTable () const
 
void flatten (SkWriteBuffer &buffer) const
 
bool unique () const
 May return true if the caller is the only owner. More...
 
void ref () const
 Increment the reference count. More...
 
void unref () const
 Decrement the reference count. More...
 

Static Public Member Functions

static sk_sp< SkColorTableMake (const uint8_t table[256])
 
static sk_sp< SkColorTableMake (const uint8_t tableA[256], const uint8_t tableR[256], const uint8_t tableG[256], const uint8_t tableB[256])
 
static sk_sp< SkColorTableDeserialize (SkReadBuffer &buffer)
 

Friends

class SkTableColorFilter
 

Detailed Description

SkColorTable holds the lookup tables for each channel (ARGB) used to define the filter behavior of SkColorFilters::Table, and provides a way to share the table data between client code and the returned SkColorFilter.

Once created, an SkColorTable is immutable.

Member Function Documentation

◆ alphaTable()

const uint8_t* SkColorTable::alphaTable ( ) const
inline

◆ blueTable()

const uint8_t* SkColorTable::blueTable ( ) const
inline

◆ Deserialize()

static sk_sp<SkColorTable> SkColorTable::Deserialize ( SkReadBuffer &  buffer)
static

◆ flatten()

void SkColorTable::flatten ( SkWriteBuffer &  buffer) const

◆ greenTable()

const uint8_t* SkColorTable::greenTable ( ) const
inline

◆ Make() [1/2]

static sk_sp<SkColorTable> SkColorTable::Make ( const uint8_t  table[256])
inlinestatic

◆ Make() [2/2]

static sk_sp<SkColorTable> SkColorTable::Make ( const uint8_t  tableA[256],
const uint8_t  tableR[256],
const uint8_t  tableG[256],
const uint8_t  tableB[256] 
)
static

◆ redTable()

const uint8_t* SkColorTable::redTable ( ) const
inline

◆ ref()

void SkRefCntBase::ref ( ) const
inlineinherited

Increment the reference count.

Must be balanced by a call to unref().

◆ unique()

bool SkRefCntBase::unique ( ) const
inlineinherited

May return true if the caller is the only owner.

Ensures that all previous owner's actions are complete.

◆ unref()

void SkRefCntBase::unref ( ) const
inlineinherited

Decrement the reference count.

If the reference count is 1 before the decrement, then delete the object. Note that if this is the case, then the object needs to have been allocated via new, and not on the stack.

Friends And Related Function Documentation

◆ SkTableColorFilter

friend class SkTableColorFilter
friend

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