Flutter Engine
The Flutter Engine
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Properties
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Related Functions
:
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
z
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
v
w
y
Enumerator
b
c
d
e
f
g
h
k
l
m
n
p
r
s
t
u
v
w
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
third_party
skia
src
text
gpu
DistanceFieldAdjustTable.h
Go to the documentation of this file.
1
/*
2
* Copyright 2015 Google Inc.
3
*
4
* Use of this source code is governed by a BSD-style license that can be
5
* found in the LICENSE file.
6
*/
7
8
#ifndef sktext_gpu_DistanceFieldAdjustTable_DEFINED
9
#define sktext_gpu_DistanceFieldAdjustTable_DEFINED
10
11
#include "
include/core/SkScalar.h
"
12
13
template
<
typename
T>
class
SkNoDestructor
;
14
15
namespace
sktext::gpu
{
16
17
// Distance field text needs this table to compute a value for use in the fragment shader.
18
class
DistanceFieldAdjustTable
{
19
public
:
20
static
const
DistanceFieldAdjustTable
*
Get
();
21
22
~DistanceFieldAdjustTable
() {
23
delete
[] fTable;
24
delete
[] fGammaCorrectTable;
25
}
26
27
SkScalar
getAdjustment
(
int
lum
,
bool
useGammaCorrectTable)
const
{
28
lum
>>= kDistanceAdjustLumShift;
29
return
useGammaCorrectTable ? fGammaCorrectTable[
lum
] : fTable[
lum
];
30
}
31
32
private
:
33
DistanceFieldAdjustTable
();
34
35
static
constexpr
int
kDistanceAdjustLumShift = 5;
36
37
SkScalar
* fTable;
38
SkScalar
* fGammaCorrectTable;
39
40
friend
class
SkNoDestructor
<
DistanceFieldAdjustTable
>;
41
};
42
43
}
// namespace sktext::gpu
44
45
#endif
SkScalar.h
SkNoDestructor
Definition:
SkNoDestructor.h:84
sktext::gpu::DistanceFieldAdjustTable
Definition:
DistanceFieldAdjustTable.h:18
sktext::gpu::DistanceFieldAdjustTable::~DistanceFieldAdjustTable
~DistanceFieldAdjustTable()
Definition:
DistanceFieldAdjustTable.h:22
sktext::gpu::DistanceFieldAdjustTable::Get
static const DistanceFieldAdjustTable * Get()
Definition:
DistanceFieldAdjustTable.cpp:107
sktext::gpu::DistanceFieldAdjustTable::getAdjustment
SkScalar getAdjustment(int lum, bool useGammaCorrectTable) const
Definition:
DistanceFieldAdjustTable.h:27
SkScalar
float SkScalar
Definition:
extension.cpp:12
lum
static float lum(float r, float g, float b)
Definition:
hsl.cpp:52
sktext::gpu
Definition:
SkCanvas.h:81
Generated on Sun Jun 23 2024 21:56:36 for Flutter Engine by
1.9.4