Go to the source code of this file.
◆ ASSERT
◆ FOR_SETUP
#define FOR_SETUP |
( |
|
index, |
|
|
|
array, |
|
|
|
setter |
|
) |
| |
Value: for (
size_t index = 0; index <
std::size(array); ++index) { \
paint.setter(array[index]);
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
◆ DEF_TEST() [1/8]
DEF_TEST |
( |
Font_getpos |
, |
|
|
r |
|
|
) |
| |
Definition at line 207 of file PaintTest.cpp.
207 {
209 const char text[] =
"Hamburgefons!@#!#23425,./;'[]";
212 uint16_t*
glyphs = glyphStorage.get();
214
218
222
223 for (bool subpix : { false, true }) {
224 font.setSubpixel(subpix);
226 font.setHinting(hint);
227 for (
auto size : { 1.0f, 12.0f, 100.0f }) {
229
233
236 };
237
244 }
245 }
246 }
247 }
248}
@ kNormal
glyph outlines modified to improve constrast
@ kNone
glyph outlines unchanged
@ kSlight
minimal modification to improve constrast
@ kFull
modifies glyph outlines for maximum constrast
@ kUTF8
uses bytes to represent UTF-8 or ASCII
#define REPORTER_ASSERT(r, cond,...)
font
Font Metadata and Metrics.
◆ DEF_TEST() [2/8]
Definition at line 43 of file PaintTest.cpp.
43 {
45
48
51
52
55
56
59
60
66}
@ kNormal_SkBlurStyle
fuzzy inside and outside
static SkScalar SK_SPI ConvertRadiusToSigma(SkScalar radius)
static sk_sp< SkMaskFilter > MakeBlur(SkBlurStyle style, SkScalar sigma, bool respectCTM=true)
@ kStrokeAndFill_Style
sets to stroke and fill geometry
◆ DEF_TEST() [3/8]
Definition at line 250 of file PaintTest.cpp.
250 {
253
255
257}
@ kBGRA_8888_SkColorType
pixel with 8 bits for blue, green, red, alpha; in 32-bit word
static bool ShouldDither(const SkPaint &, SkColorType)
◆ DEF_TEST() [4/8]
DEF_TEST |
( |
Paint_flattening |
, |
|
|
reporter |
|
|
) |
| |
Definition at line 102 of file PaintTest.cpp.
102 {
107 };
112 };
117 };
118
119#define FOR_SETUP(index, array, setter) \
120 for (size_t index = 0; index < std::size(array); ++index) { \
121 paint.setter(array[index]);
122
124 paint.setAntiAlias(
true);
125
126
127
131
134
136 writer.writeToMemory(buf.get());
138
139 SkPaint paint2 = reader.readPaint();
141
142 }}}
#define FOR_SETUP(index, array, setter)
static void Flatten(const SkPaint &paint, SkWriteBuffer &buffer)
@ kButt_Cap
no stroke extension
@ kStroke_Style
set to stroke geometry
@ kFill_Style
set to fill geometry
@ kMiter_Join
extends to miter limit
@ kBevel_Join
connects outside edges
◆ DEF_TEST() [5/8]
DEF_TEST |
( |
Paint_MoreFlattening |
, |
|
|
r |
|
|
) |
| |
Definition at line 163 of file PaintTest.cpp.
163 {
165 paint.setColor(0x00AABBCC);
167
170
172 writer.writeToMemory(buf.get());
174
175 SkPaint other = reader.readPaint();
176 ASSERT(reader.offset() == writer.bytesWritten());
177
178
181}
std::optional< SkBlendMode > asBlendMode() const
◆ DEF_TEST() [6/8]
DEF_TEST |
( |
Paint_nothingToDraw |
, |
|
|
r |
|
|
) |
| |
Definition at line 183 of file PaintTest.cpp.
183 {
185
189
190 paint.setAlpha(0xFF);
193
196
201
205}
@ kSrcOver
r = s + (1-sa)*d
static sk_sp< SkColorFilter > Matrix(const SkColorMatrix &)
void postTranslate(float dr, float dg, float db, float da)
◆ DEF_TEST() [7/8]
DEF_TEST |
( |
Paint_regression_cubic |
, |
|
|
reporter |
|
|
) |
| |
Definition at line 70 of file PaintTest.cpp.
70 {
73
74 path.moveTo(460.2881309415525f,
75 303.250847066498f);
76 path.cubicTo(463.36378422175284f,
77 302.1169735073363f,
78 456.32239330810046f,
79 304.720354932878f,
80 453.15255460013304f,
81 305.788586869862f);
82
84 fillR =
path.getBounds();
85
89 strokeR =
stroke.getBounds();
90
94 paint.getStrokeWidth() * miter :
95 paint.getStrokeWidth();
97
98
100}
static float max(float r, float g, float b)
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
SK_API bool FillPathWithPaint(const SkPath &src, const SkPaint &paint, SkPath *dst, const SkRect *cullRect, SkScalar resScale=1)
static SkRect inset(const SkRect &r)
void inset(float dx, float dy)
bool contains(SkScalar x, SkScalar y) const
◆ DEF_TEST() [8/8]
DEF_TEST |
( |
Paint_regression_measureText |
, |
|
|
reporter |
|
|
) |
| |
Definition at line 148 of file PaintTest.cpp.
148 {
149
152
155
156
159}
void setLTRB(float left, float top, float right, float bottom)