Flutter Engine
The Flutter Engine
colrv1.cpp
Go to the documentation of this file.
1/*
2 * Copyright 2021 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#include "gm/gm.h"
11#include "include/core/SkFont.h"
18#include "include/core/SkSize.h"
22#include "tools/Resources.h"
23#include "tools/ToolUtils.h"
25
26#if defined(SK_TYPEFACE_FACTORY_FONTATIONS)
28#endif
29
30#include <string.h>
31#include <initializer_list>
32
33namespace skiagm {
34
35namespace {
36const SkScalar kTextSizes[] = {12, 18, 30, 120};
37const char kTestFontName[] = "fonts/test_glyphs-glyf_colr_1.ttf";
38const char kTestFontNameVariable[] = "fonts/test_glyphs-glyf_colr_1_variable.ttf";
39const SkScalar xWidth = 1200;
40const SkScalar xTranslate = 200;
41} // namespace
42
43class ColrV1GM : public GM {
44public:
45 ColrV1GM(const char* testName,
46 SkSpan<const uint32_t> codepoints,
47 SkScalar skewX,
48 SkScalar rotateDeg,
49 std::initializer_list<SkFontArguments::VariationPosition::Coordinate>
50 specifiedVariations)
51 : fTestName(testName), fCodepoints(codepoints), fSkewX(skewX), fRotateDeg(rotateDeg) {
52 fVariationPosition.coordinateCount = specifiedVariations.size();
53 fCoordinates = std::make_unique<SkFontArguments::VariationPosition::Coordinate[]>(
54 specifiedVariations.size());
55 for (size_t i = 0; i < specifiedVariations.size(); ++i) {
56 fCoordinates[i] = std::data(specifiedVariations)[i];
57 }
58
59 fVariationPosition.coordinates = fCoordinates.get();
60 }
61
62protected:
63 void onOnceBeforeDraw() override {
64 if (fVariationPosition.coordinateCount) {
65 fTypeface = ToolUtils::CreateTypefaceFromResource(kTestFontNameVariable, 0);
66 } else {
67 fTypeface = ToolUtils::CreateTypefaceFromResource(kTestFontName, 0);
68 }
69 fVariationSliders = ToolUtils::VariationSliders(fTypeface.get(), fVariationPosition);
70 }
71
72 SkString getName() const override {
73 SkASSERT(!fTestName.isEmpty());
74 SkString gm_name = SkStringPrintf("colrv1_%s", fTestName.c_str());
75
76 if (fSkewX) {
77 gm_name.append(SkStringPrintf("_skew_%.2f", fSkewX));
78 }
79
80 if (fRotateDeg) {
81 gm_name.append(SkStringPrintf("_rotate_%.2f", fRotateDeg));
82 }
83
84 for (int i = 0; i < fVariationPosition.coordinateCount; ++i) {
86 fVariationPosition.coordinates[i].axis);
87 gm_name.append(SkStringPrintf(
88 "_%s_%.2f", tagName.c_str(), fVariationPosition.coordinates[i].value));
89 }
90
91 return gm_name;
92 }
93
94 bool onGetControls(SkMetaData* controls) override {
95 return fVariationSliders.writeControls(controls);
96 }
97
98 void onSetControls(const SkMetaData& controls) override {
99 return fVariationSliders.readControls(controls);
100 }
101
102 SkISize getISize() override {
103 // Sweep tests get a slightly wider canvas so that glyphs from one group fit in one row.
104 if (fTestName.equals("sweep_varsweep")) {
105 return SkISize::Make(xWidth + 500, xWidth);
106 }
107 return SkISize::Make(xWidth, xWidth);
108 }
109
111 if (!fTypeface) {
112 return nullptr;
113 }
115 fVariationSliders.getCoordinates();
116 SkFontArguments::VariationPosition varPos = {coords.data(),
117 static_cast<int>(coords.size())};
119 args.setVariationDesignPosition(varPos);
120 return fTypeface->makeClone(args);
121 }
122
123 DrawResult onDraw(SkCanvas* canvas, SkString* errorMsg) override {
124 canvas->drawColor(SK_ColorWHITE);
126
127 canvas->translate(xTranslate, 20);
128
129 if (!fTypeface) {
130 *errorMsg = "Did not recognize COLR v1 font format.";
131 return DrawResult::kSkip;
132 }
133
134 canvas->rotate(fRotateDeg);
135 canvas->skew(fSkewX, 0);
136
138
139 SkFontMetrics metrics;
140 SkScalar y = 0;
141 std::vector<SkColor> paint_colors = {
143 auto paint_color_iterator = paint_colors.begin();
144 for (SkScalar textSize : kTextSizes) {
145 font.setSize(textSize);
146 font.getMetrics(&metrics);
147 font.setHinting(SkFontHinting::kNone);
148 SkScalar y_shift = -(metrics.fAscent + metrics.fDescent + metrics.fLeading) * 1.2;
149 y += y_shift;
150 paint.setColor(*paint_color_iterator);
151 int x = 0;
152 // Perform simple line breaking to fit more glyphs into the GM canvas.
153 for (size_t i = 0; i < fCodepoints.size(); ++i) {
154 SkScalar glyphAdvance = font.measureText(
155 &fCodepoints[i], sizeof(uint32_t), SkTextEncoding::kUTF32, nullptr);
156 if (0 < x && getISize().width() - xTranslate < x + glyphAdvance) {
157 y += y_shift;
158 x = 0;
159 }
160 canvas->drawSimpleText(&fCodepoints[i],
161 sizeof(uint32_t),
163 x,
164 y,
165 font,
166 paint);
167 x += glyphAdvance + glyphAdvance * 0.05f;
168 }
169 paint_color_iterator++;
170 }
171 return DrawResult::kOk;
172 }
173
174private:
175 using INHERITED = GM;
176
177 SkString fTestName;
178 sk_sp<SkTypeface> fTypeface;
179 SkSpan<const uint32_t> fCodepoints;
180 SkScalar fSkewX;
181 SkScalar fRotateDeg;
182 std::unique_ptr<SkFontArguments::VariationPosition::Coordinate[]> fCoordinates;
183 SkFontArguments::VariationPosition fVariationPosition;
184 ToolUtils::VariationSliders fVariationSliders;
185};
186
187// clang-format off
188// Generated using test glyphs generator script from https://github.com/googlefonts/color-fonts:
189// $ python3 config/test_glyphs-glyf_colr_1.py -vvv --generate-descriptions fonts/
190// Regenerate descriptions and paste the generated arrays here when updating the test font.
191namespace ColrV1TestDefinitions {
192const uint32_t gradient_stops_repeat[] = {0xf0100, 0xf0101, 0xf0102, 0xf0103};
193const uint32_t sweep_varsweep[] = {
194 0xf0200, 0xf0201, 0xf0202, 0xf0203, 0xf0204, 0xf0205, 0xf0206, 0xf0207, 0xf0208,
195 0xf0209, 0xf020a, 0xf020b, 0xf020c, 0xf020d, 0xf020e, 0xf020f, 0xf0210, 0xf0211,
196 0xf0212, 0xf0213, 0xf0214, 0xf0215, 0xf0216, 0xf0217, 0xf0218, 0xf0219, 0xf021a,
197 0xf021b, 0xf021c, 0xf021d, 0xf021e, 0xf021f, 0xf0220, 0xf0221, 0xf0222, 0xf0223,
198 0xf0224, 0xf0225, 0xf0226, 0xf0227, 0xf0228, 0xf0229, 0xf022a, 0xf022b, 0xf022c,
199 0xf022d, 0xf022e, 0xf022f, 0xf0230, 0xf0231, 0xf0232, 0xf0233, 0xf0234, 0xf0235,
200 0xf0236, 0xf0237, 0xf0238, 0xf0239, 0xf023a, 0xf023b, 0xf023c, 0xf023d, 0xf023e,
201 0xf023f, 0xf0240, 0xf0241, 0xf0242, 0xf0243, 0xf0244, 0xf0245, 0xf0246, 0xf0247};
202const uint32_t paint_scale[] = {0xf0300, 0xf0301, 0xf0302, 0xf0303, 0xf0304, 0xf0305};
203const uint32_t extend_mode[] = {
204 0xf0500, 0xf0501, 0xf0502, 0xf0503, 0xf0504, 0xf0505, 0xf0506, 0xf0507, 0xf0508};
205const uint32_t paint_rotate[] = {0xf0600, 0xf0601, 0xf0602, 0xf0603};
206const uint32_t paint_skew[] = {0xf0700, 0xf0701, 0xf0702, 0xf0703, 0xf0704, 0xf0705};
207const uint32_t paint_transform[] = {0xf0800, 0xf0801, 0xf0802, 0xf0803};
208const uint32_t paint_translate[] = {0xf0900, 0xf0901, 0xf0902, 0xf0903, 0xf0904, 0xf0905, 0xf0906};
209const uint32_t composite_mode[] = {0xf0a00, 0xf0a01, 0xf0a02, 0xf0a03, 0xf0a04, 0xf0a05, 0xf0a06,
210 0xf0a07, 0xf0a08, 0xf0a09, 0xf0a0a, 0xf0a0b, 0xf0a0c, 0xf0a0d,
211 0xf0a0e, 0xf0a0f, 0xf0a10, 0xf0a11, 0xf0a12, 0xf0a13, 0xf0a14,
212 0xf0a15, 0xf0a16, 0xf0a17, 0xf0a18, 0xf0a19, 0xf0a1a, 0xf0a1b};
213const uint32_t foreground_color[] = {
214 0xf0b00, 0xf0b01, 0xf0b02, 0xf0b03, 0xf0b04, 0xf0b05, 0xf0b06, 0xf0b07};
215const uint32_t clipbox[] = {0xf0c00, 0xf0c01, 0xf0c02, 0xf0c03, 0xf0c04};
216const uint32_t gradient_p2_skewed[] = {0xf0d00};
217const uint32_t variable_alpha[] = {0xf1000};
218const uint32_t paintcolrglyph_cycle[] = { 0xf1100, 0xf1101, 0xf1200 };
219const uint32_t sweep_coincident[] = { 0xf1300, 0xf1301, 0xf1302, 0xf1303, 0xf1304, 0xf1305,
220 0xf1306, 0xf1307, 0xf1308, 0xf1309, 0xf130a, 0xf130b,
221 0xf130c, 0xf130d, 0xf130e, 0xf130f, 0xf1310, 0xf1311,
222 0xf1312, 0xf1313, 0xf1314, 0xf1315, 0xf1316, 0xf1317};
223const uint32_t paint_glyph_nested[] = { 0xf1400, 0xf1401, 0xf1402, 0xf1403,
224 0xf1404, 0xf1405, 0xf1406, 0xf1407,
225 0xf1408, 0xf1409, 0xf140a, 0xf140b,
226 0xf140c, 0xf140d, 0xf140e, 0xf140f };
227// clang-format on
228
229}; // namespace ColrV1TestDefinitions
230
231namespace {
232std::unique_ptr<ColrV1GM> F(
233 const char* name,
234 SkSpan<const uint32_t> codepoints,
235 SkScalar skewX,
236 SkScalar rotateDeg,
237 std::initializer_list<SkFontArguments::VariationPosition::Coordinate> variations) {
238 return std::make_unique<ColrV1GM>(name, codepoints, skewX, rotateDeg, variations);
239}
240
241SkFourByteTag constexpr operator"" _t(const char* tagName, size_t size) {
242 SkASSERT(size == 4);
243 return SkSetFourByteTag(tagName[0], tagName[1], tagName[2], tagName[3]);
244}
245} // namespace
246
247// clang-format off
248#define C(TEST_CATEGORY) #TEST_CATEGORY, ColrV1TestDefinitions::TEST_CATEGORY
249DEF_GM(return F(C(clipbox), 0.0f, 0.0f, {}))
250DEF_GM(return F(C(clipbox), 0.0f, 0.0f, {{"CLIO"_t, 200.f}}))
251DEF_GM(return F(C(composite_mode), 0.0f, 0.0f, {}))
252DEF_GM(return F(C(composite_mode), -0.5f, 0.0f, {}))
253DEF_GM(return F(C(composite_mode), -0.5f, 20.0f, {}))
254DEF_GM(return F(C(composite_mode), 0.0f, 20.0f, {}))
255DEF_GM(return F(C(extend_mode), 0.0f, 0.0f, {}))
256DEF_GM(return F(C(extend_mode), 0.0f, 0.0f, {{"COL1"_t, -0.25f}, {"COL3"_t, 0.25f}}))
257DEF_GM(return F(C(extend_mode), 0.0f, 0.0f, {{"COL1"_t, 0.5f}, {"COL3"_t, -0.5f}}))
258DEF_GM(return F(C(extend_mode), 0.0f, 0.0f, {{"COL3"_t, 0.5f}}))
259DEF_GM(return F(C(extend_mode), 0.0f, 0.0f, {{"COL3"_t, 1.f}}))
260// Radial gradient tests where radii become negative
261DEF_GM(return F(C(extend_mode), 0.0f, 0.0f, {{"COL1"_t, -1.5f}}))
262// Both radii negative and equal, nothing should render.
263DEF_GM(return F(C(extend_mode), 0.0f, 0.0f, {{"GRR0"_t, -200.f}, {"GRR1"_t, -300.f}}))
264// Small cones opening to the right.
265DEF_GM(return F(C(extend_mode), 0.0f, 0.0f, {{"GRX0"_t, -1000.f}, {"GRX1"_t, -1000.f}, {"GRR0"_t, -1000.f}, {"GRR1"_t, -900.f}}))
266// Small cones opening to the left.
267DEF_GM(return F(C(extend_mode), 0.0f, 0.0f, {{"GRX0"_t, 1000.f}, {"GRX1"_t, -1000.f}, {"GRR0"_t, -1000.f}, {"GRR1"_t, 200.f}}))
268// Pad cone should appear green.
269DEF_GM(return F(C(extend_mode), 0.0f, 0.0f, {{"GRR0"_t, -50.f}, {"COL3"_t, -2.f}, {"COL2"_t, -2.f}, {"COL1"_t, -0.9f}}))
270// Pad cone should appear red.
271DEF_GM(return F(C(extend_mode), 0.0f, 0.0f, {{"GRR0"_t, -50.f}, {"COL3"_t, -2.f}, {"COL2"_t, -2.f}, {"COL1"_t, -1.1f}}))
272// Hard boundary for pad mode, should appear on the right inside the glyph for linear and radial.
273DEF_GM(return F(C(extend_mode), 0.0f, 0.0f, {{"COL3"_t, 1.f}, {"COL2"_t, 1.5f}, {"COL1"_t, 2.f}}))
274// Extend mode with rotation or skew below.
275DEF_GM(return F(C(extend_mode), -0.5f, 0.0f, {}))
276DEF_GM(return F(C(extend_mode), -0.5f, 20.0f, {}))
277DEF_GM(return F(C(extend_mode), 0.0f, 20.0f, {}))
278DEF_GM(return F(C(extend_mode), 0.0f, 0.0f, {{"COL2"_t, -0.3f}}))
279DEF_GM(return F(C(extend_mode), 0.0f, 0.0f, {{"GRR0"_t, 430.f}, {"GRR1"_t, 40.f}}))
280DEF_GM(return F(C(foreground_color), 0.0f, 0.0f, {}))
281DEF_GM(return F(C(gradient_p2_skewed), 0.0f, 0.0f, {}))
282DEF_GM(return F(C(gradient_stops_repeat), 0.0f, 0.0f, {}))
283DEF_GM(return F(C(gradient_stops_repeat), -0.5f, 0.0f, {}))
284DEF_GM(return F(C(gradient_stops_repeat), -0.5f, 20.0f, {}))
285DEF_GM(return F(C(gradient_stops_repeat), 0.0f, 20.0f, {}))
286DEF_GM(return F(C(paint_rotate), 0.0f, 0.0f, {}))
287DEF_GM(return F(C(paint_rotate), 0.0f, 0.0f, {{"ROTA"_t, 40.f}}))
288DEF_GM(return F(C(paint_rotate), 0.0f, 0.0f, {{"ROTX"_t, -250.f}, {"ROTY"_t, -250.f}}))
289DEF_GM(return F(C(paint_scale), 0.0f, 0.0f, {}))
290DEF_GM(return F(C(paint_scale), 0.0f, 0.0f, {{"SCOX"_t, 200.f}, {"SCOY"_t, 200.f}}))
291DEF_GM(return F(C(paint_scale), 0.0f, 0.0f, {{"SCSX"_t, 0.25f}, {"SCOY"_t, 0.25f}}))
292DEF_GM(return F(C(paint_scale), 0.0f, 0.0f, {{"SCSX"_t, -1.f}, {"SCOY"_t, -1.f}}))
293DEF_GM(return F(C(paint_skew), 0.0f, 0.0f, {}))
294DEF_GM(return F(C(paint_skew), 0.0f, 0.0f, {{"SKXA"_t, 20.f}}))
295DEF_GM(return F(C(paint_skew), 0.0f, 0.0f, {{"SKYA"_t, 20.f}}))
296DEF_GM(return F(C(paint_skew), 0.0f, 0.0f, {{"SKCX"_t, 200.f},{"SKCY"_t, 200.f}}))
297DEF_GM(return F(C(paint_transform), 0.0f, 0.0f, {}))
298DEF_GM(return F(C(paint_translate), 0.0f, 0.0f, {}))
299DEF_GM(return F(C(paint_translate), 0.0f, 0.0f, {{"TLDX"_t, 100.f}, {"TLDY"_t, 100.f}}))
300DEF_GM(return F(C(sweep_varsweep), 0.0f, 0.0f, {}))
301DEF_GM(return F(C(sweep_varsweep), -0.5f, 0.0f, {}))
302DEF_GM(return F(C(sweep_varsweep), -0.5f, 20.0f, {}))
303DEF_GM(return F(C(sweep_varsweep), 0.0f, 20.0f, {}))
304DEF_GM(return F(C(sweep_varsweep), 0.0f, 0.0f, {{"SWPS"_t, 0.f}}))
305DEF_GM(return F(C(sweep_varsweep), 0.0f, 0.0f, {{"SWPS"_t, 90.f}}))
306DEF_GM(return F(C(sweep_varsweep), 0.0f, 0.0f, {{"SWPE"_t, -90.f}}))
307DEF_GM(return F(C(sweep_varsweep), 0.0f, 0.0f, {{"SWPE"_t, -45.f}}))
308DEF_GM(return F(C(sweep_varsweep), 0.0f, 0.0f, {{"SWPS"_t, -45.f},{"SWPE"_t, 45.f}}))
309DEF_GM(return F(C(sweep_varsweep),
310 0.0f,
311 0.0f,
312 {{"SWC1"_t, -0.25f},
313 {"SWC2"_t, 0.083333333f},
314 {"SWC3"_t, 0.083333333f},
315 {"SWC4"_t, +0.25f}}))
316DEF_GM(return F(C(variable_alpha), 0.0f, 0.0f, {}))
317DEF_GM(return F(C(variable_alpha), 0.0f, 0.0f, {{"APH1"_t, -0.7f}}))
318DEF_GM(return F(C(variable_alpha), 0.0f, 0.0f, {{"APH2"_t, -0.7f}, {"APH3"_t, -0.2f}}))
319DEF_GM(return F(C(paintcolrglyph_cycle), 0.0f, 0.0f, {}))
320DEF_GM(return F(C(sweep_coincident), 0.0f, 0.0f, {}))
321DEF_GM(return F(C(paint_glyph_nested), 0.0f, 0.0f, {}))
322// clang-format on
323
324} // namespace skiagm
#define SkASSERT(cond)
Definition: SkAssert.h:116
constexpr SkColor SK_ColorBLUE
Definition: SkColor.h:135
constexpr SkColor SK_ColorRED
Definition: SkColor.h:126
constexpr SkColor SK_ColorBLACK
Definition: SkColor.h:103
constexpr SkColor SK_ColorGREEN
Definition: SkColor.h:131
constexpr SkColor SK_ColorWHITE
Definition: SkColor.h:122
@ kNone
glyph outlines unchanged
@ kUTF32
uses four byte words to represent all of Unicode
SK_API SkString SkStringPrintf(const char *format,...) SK_PRINTF_LIKE(1
Creates a new string and writes into it using a printf()-style format.
uint32_t SkFourByteTag
Definition: SkTypes.h:166
static constexpr SkFourByteTag SkSetFourByteTag(char a, char b, char c, char d)
Definition: SkTypes.h:167
#define F(x)
void drawSimpleText(const void *text, size_t byteLength, SkTextEncoding encoding, SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
Definition: SkCanvas.cpp:2413
void translate(SkScalar dx, SkScalar dy)
Definition: SkCanvas.cpp:1278
void drawColor(SkColor color, SkBlendMode mode=SkBlendMode::kSrcOver)
Definition: SkCanvas.h:1182
void rotate(SkScalar degrees)
Definition: SkCanvas.cpp:1300
void skew(SkScalar sx, SkScalar sy)
Definition: SkCanvas.cpp:1312
Definition: SkFont.h:35
constexpr T * data() const
Definition: SkSpan_impl.h:94
constexpr size_t size() const
Definition: SkSpan_impl.h:95
bool equals(const SkString &) const
Definition: SkString.cpp:324
bool isEmpty() const
Definition: SkString.h:130
void append(const char text[])
Definition: SkString.h:203
const char * c_str() const
Definition: SkString.h:133
sk_sp< SkTypeface > makeClone(const SkFontArguments &) const
Definition: SkTypeface.cpp:190
SkSpan< const SkFontArguments::VariationPosition::Coordinate > getCoordinates()
Definition: ToolUtils.cpp:600
void readControls(const SkMetaData &controls, bool *changed=nullptr)
Definition: ToolUtils.cpp:585
static SkString tagToString(SkFourByteTag tag)
Definition: ToolUtils.cpp:563
bool writeControls(SkMetaData *controls)
Definition: ToolUtils.cpp:573
T * get() const
Definition: SkRefCnt.h:303
void onSetControls(const SkMetaData &controls) override
Definition: colrv1.cpp:98
bool onGetControls(SkMetaData *controls) override
Definition: colrv1.cpp:94
ColrV1GM(const char *testName, SkSpan< const uint32_t > codepoints, SkScalar skewX, SkScalar rotateDeg, std::initializer_list< SkFontArguments::VariationPosition::Coordinate > specifiedVariations)
Definition: colrv1.cpp:45
sk_sp< SkTypeface > makeVariedTypeface()
Definition: colrv1.cpp:110
void onOnceBeforeDraw() override
Definition: colrv1.cpp:63
DrawResult onDraw(SkCanvas *canvas, SkString *errorMsg) override
Definition: colrv1.cpp:123
SkISize getISize() override
Definition: colrv1.cpp:102
SkString getName() const override
Definition: colrv1.cpp:72
Definition: gm.h:110
GM(SkColor backgroundColor=SK_ColorWHITE)
Definition: gm.cpp:81
const Paint & paint
Definition: color_source.cc:38
#define C(TEST_CATEGORY)
Definition: colrv1.cpp:248
float SkScalar
Definition: extension.cpp:12
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
double y
double x
sk_sp< SkTypeface > CreateTypefaceFromResource(const char *resource, int ttcIndex)
DEF_SWITCHES_START aot vmservice shared library name
Definition: switches.h:32
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
Definition: switches.h:259
font
Font Metadata and Metrics.
const uint32_t paint_transform[]
Definition: colrv1.cpp:207
const uint32_t paintcolrglyph_cycle[]
Definition: colrv1.cpp:218
const uint32_t paint_glyph_nested[]
Definition: colrv1.cpp:223
const uint32_t gradient_stops_repeat[]
Definition: colrv1.cpp:192
const uint32_t composite_mode[]
Definition: colrv1.cpp:209
const uint32_t paint_translate[]
Definition: colrv1.cpp:208
const uint32_t paint_skew[]
Definition: colrv1.cpp:206
const uint32_t sweep_coincident[]
Definition: colrv1.cpp:219
const uint32_t sweep_varsweep[]
Definition: colrv1.cpp:193
const uint32_t paint_scale[]
Definition: colrv1.cpp:202
const uint32_t variable_alpha[]
Definition: colrv1.cpp:217
const uint32_t clipbox[]
Definition: colrv1.cpp:215
const uint32_t extend_mode[]
Definition: colrv1.cpp:203
const uint32_t foreground_color[]
Definition: colrv1.cpp:213
const uint32_t gradient_p2_skewed[]
Definition: colrv1.cpp:216
const uint32_t paint_rotate[]
Definition: colrv1.cpp:205
DEF_GM(return F(C(clipbox), 0.0f, 0.0f, {})) DEF_GM(return F(C(clipbox)
DrawResult
Definition: gm.h:104
Definition: SkMD5.cpp:120
SkScalar fLeading
distance to add between lines, typically positive or zero
Definition: SkFontMetrics.h:57
SkScalar fAscent
distance to reserve above baseline, typically negative
Definition: SkFontMetrics.h:54
SkScalar fDescent
distance to reserve below baseline, typically positive
Definition: SkFontMetrics.h:55
Definition: SkSize.h:16
static constexpr SkISize Make(int32_t w, int32_t h)
Definition: SkSize.h:20
constexpr int32_t width() const
Definition: SkSize.h:36
std::shared_ptr< const fml::Mapping > data
Definition: texture_gles.cc:63