#include <SkColorTable.h>
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.
Definition at line 25 of file SkColorTable.h.
◆ alphaTable()
const uint8_t * SkColorTable::alphaTable |
( |
| ) |
const |
|
inline |
Definition at line 41 of file SkColorTable.h.
uint8_t * getAddr8(int x, int y) const
◆ blueTable()
const uint8_t * SkColorTable::blueTable |
( |
| ) |
const |
|
inline |
◆ Deserialize()
Definition at line 45 of file SkColorTable.cpp.
45 {
46 uint8_t argb[4*256];
47 if (
buffer.readByteArray(argb,
sizeof(argb))) {
49 }
50 return nullptr;
51}
static sk_sp< SkColorTable > Make(const uint8_t table[256])
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
◆ flatten()
◆ greenTable()
const uint8_t * SkColorTable::greenTable |
( |
| ) |
const |
|
inline |
◆ Make() [1/2]
◆ Make() [2/2]
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 |
Definition at line 14 of file SkColorTable.cpp.
17 {
18 if (!tableA && !tableR && !tableG && !tableB) {
19 return nullptr;
20 }
21
24 return nullptr;
25 }
26 uint8_t *
a =
table.getAddr8(0,0),
27 *r =
table.getAddr8(0,1),
28 *g =
table.getAddr8(0,2),
30 for (
int i = 0;
i < 256;
i++) {
31 a[
i] = tableA ? tableA[
i] :
i;
32 r[
i] = tableR ? tableR[
i] :
i;
33 g[
i] = tableG ? tableG[
i] :
i;
34 b[
i] = tableB ? tableB[
i] :
i;
35 }
37
39}
static SkImageInfo MakeA8(int width, int height)
◆ redTable()
const uint8_t * SkColorTable::redTable |
( |
| ) |
const |
|
inline |
◆ SkTableColorFilter
The documentation for this class was generated from the following files: