64#define DEBUGCANVAS_ATTRIBUTE_DUMP "dump"
65#define DEBUGCANVAS_ATTRIBUTE_COMMAND "command"
66#define DEBUGCANVAS_ATTRIBUTE_VISIBLE "visible"
67#define DEBUGCANVAS_ATTRIBUTE_MATRIX "matrix"
68#define DEBUGCANVAS_ATTRIBUTE_DRAWDEPTHTRANS "drawDepthTranslation"
69#define DEBUGCANVAS_ATTRIBUTE_COORDS "coords"
70#define DEBUGCANVAS_ATTRIBUTE_EDGING "edging"
71#define DEBUGCANVAS_ATTRIBUTE_HINTING "hinting"
72#define DEBUGCANVAS_ATTRIBUTE_BOUNDS "bounds"
73#define DEBUGCANVAS_ATTRIBUTE_PAINT "paint"
74#define DEBUGCANVAS_ATTRIBUTE_OUTER "outer"
75#define DEBUGCANVAS_ATTRIBUTE_INNER "inner"
76#define DEBUGCANVAS_ATTRIBUTE_MODE "mode"
77#define DEBUGCANVAS_ATTRIBUTE_POINTS "points"
78#define DEBUGCANVAS_ATTRIBUTE_PATH "path"
79#define DEBUGCANVAS_ATTRIBUTE_CLUSTERS "clusters"
80#define DEBUGCANVAS_ATTRIBUTE_TEXT "text"
81#define DEBUGCANVAS_ATTRIBUTE_COLOR "color"
82#define DEBUGCANVAS_ATTRIBUTE_ALPHA "alpha"
83#define DEBUGCANVAS_ATTRIBUTE_BLENDMODE "blendMode"
84#define DEBUGCANVAS_ATTRIBUTE_SAMPLING "sampling"
85#define DEBUGCANVAS_ATTRIBUTE_STYLE "style"
86#define DEBUGCANVAS_ATTRIBUTE_STROKEWIDTH "strokeWidth"
87#define DEBUGCANVAS_ATTRIBUTE_STROKEMITER "strokeMiter"
88#define DEBUGCANVAS_ATTRIBUTE_STROKEJOIN "strokeJoin"
89#define DEBUGCANVAS_ATTRIBUTE_CAP "cap"
90#define DEBUGCANVAS_ATTRIBUTE_ANTIALIAS "antiAlias"
91#define DEBUGCANVAS_ATTRIBUTE_DITHER "dither"
92#define DEBUGCANVAS_ATTRIBUTE_FAKEBOLDTEXT "fakeBoldText"
93#define DEBUGCANVAS_ATTRIBUTE_LINEARTEXT "linearText"
94#define DEBUGCANVAS_ATTRIBUTE_SUBPIXELTEXT "subpixelText"
95#define DEBUGCANVAS_ATTRIBUTE_DEVKERNTEXT "devKernText"
96#define DEBUGCANVAS_ATTRIBUTE_LCDRENDERTEXT "lcdRenderText"
97#define DEBUGCANVAS_ATTRIBUTE_EMBEDDEDBITMAPTEXT "embeddedBitmapText"
98#define DEBUGCANVAS_ATTRIBUTE_AUTOHINTING "forceAutoHinting"
99#define DEBUGCANVAS_ATTRIBUTE_REGION "region"
100#define DEBUGCANVAS_ATTRIBUTE_REGIONOP "op"
101#define DEBUGCANVAS_ATTRIBUTE_EDGESTYLE "edgeStyle"
102#define DEBUGCANVAS_ATTRIBUTE_DEVICEREGION "deviceRegion"
103#define DEBUGCANVAS_ATTRIBUTE_BLUR "blur"
104#define DEBUGCANVAS_ATTRIBUTE_SIGMA "sigma"
105#define DEBUGCANVAS_ATTRIBUTE_QUALITY "quality"
106#define DEBUGCANVAS_ATTRIBUTE_TEXTSIZE "textSize"
107#define DEBUGCANVAS_ATTRIBUTE_TEXTSCALEX "textScaleX"
108#define DEBUGCANVAS_ATTRIBUTE_TEXTSKEWX "textSkewX"
109#define DEBUGCANVAS_ATTRIBUTE_DASHING "dashing"
110#define DEBUGCANVAS_ATTRIBUTE_INTERVALS "intervals"
111#define DEBUGCANVAS_ATTRIBUTE_PHASE "phase"
112#define DEBUGCANVAS_ATTRIBUTE_FILLTYPE "fillType"
113#define DEBUGCANVAS_ATTRIBUTE_VERBS "verbs"
114#define DEBUGCANVAS_ATTRIBUTE_NAME "name"
115#define DEBUGCANVAS_ATTRIBUTE_DATA "data"
116#define DEBUGCANVAS_ATTRIBUTE_VALUES "values"
117#define DEBUGCANVAS_ATTRIBUTE_SHADER "shader"
118#define DEBUGCANVAS_ATTRIBUTE_PATHEFFECT "pathEffect"
119#define DEBUGCANVAS_ATTRIBUTE_MASKFILTER "maskFilter"
120#define DEBUGCANVAS_ATTRIBUTE_XFERMODE "xfermode"
121#define DEBUGCANVAS_ATTRIBUTE_BACKDROP "backdrop"
122#define DEBUGCANVAS_ATTRIBUTE_COLORFILTER "colorfilter"
123#define DEBUGCANVAS_ATTRIBUTE_IMAGEFILTER "imagefilter"
124#define DEBUGCANVAS_ATTRIBUTE_IMAGE "image"
125#define DEBUGCANVAS_ATTRIBUTE_IMAGE_INDEX "imageIndex"
126#define DEBUGCANVAS_ATTRIBUTE_BITMAP "bitmap"
127#define DEBUGCANVAS_ATTRIBUTE_SRC "src"
128#define DEBUGCANVAS_ATTRIBUTE_DST "dst"
129#define DEBUGCANVAS_ATTRIBUTE_CENTER "center"
130#define DEBUGCANVAS_ATTRIBUTE_STRICT "strict"
131#define DEBUGCANVAS_ATTRIBUTE_DESCRIPTION "description"
132#define DEBUGCANVAS_ATTRIBUTE_X "x"
133#define DEBUGCANVAS_ATTRIBUTE_Y "y"
134#define DEBUGCANVAS_ATTRIBUTE_RUNS "runs"
135#define DEBUGCANVAS_ATTRIBUTE_POSITIONS "positions"
136#define DEBUGCANVAS_ATTRIBUTE_GLYPHS "glyphs"
137#define DEBUGCANVAS_ATTRIBUTE_FONT "font"
138#define DEBUGCANVAS_ATTRIBUTE_TYPEFACE "typeface"
139#define DEBUGCANVAS_ATTRIBUTE_CUBICS "cubics"
140#define DEBUGCANVAS_ATTRIBUTE_COLORS "colors"
141#define DEBUGCANVAS_ATTRIBUTE_TEXTURECOORDS "textureCoords"
142#define DEBUGCANVAS_ATTRIBUTE_STARTANGLE "startAngle"
143#define DEBUGCANVAS_ATTRIBUTE_SWEEPANGLE "sweepAngle"
144#define DEBUGCANVAS_ATTRIBUTE_USECENTER "useCenter"
145#define DEBUGCANVAS_ATTRIBUTE_SHORTDESC "shortDesc"
146#define DEBUGCANVAS_ATTRIBUTE_UNIQUE_ID "uniqueID"
147#define DEBUGCANVAS_ATTRIBUTE_WIDTH "width"
148#define DEBUGCANVAS_ATTRIBUTE_HEIGHT "height"
149#define DEBUGCANVAS_ATTRIBUTE_ALPHA "alpha"
150#define DEBUGCANVAS_ATTRIBUTE_LATTICE "lattice"
151#define DEBUGCANVAS_ATTRIBUTE_LATTICEXCOUNT "xCount"
152#define DEBUGCANVAS_ATTRIBUTE_LATTICEYCOUNT "yCount"
153#define DEBUGCANVAS_ATTRIBUTE_LATTICEXDIVS "xDivs"
154#define DEBUGCANVAS_ATTRIBUTE_LATTICEYDIVS "yDivs"
155#define DEBUGCANVAS_ATTRIBUTE_LATTICEFLAGS "flags"
156#define DEBUGCANVAS_ATTRIBUTE_ZPLANE "zPlane"
157#define DEBUGCANVAS_ATTRIBUTE_LIGHTPOSITION "lightPositions"
158#define DEBUGCANVAS_ATTRIBUTE_AMBIENTCOLOR "ambientColor"
159#define DEBUGCANVAS_ATTRIBUTE_SPOTCOLOR "spotColor"
160#define DEBUGCANVAS_ATTRIBUTE_LIGHTRADIUS "lightRadius"
161#define DEBUGCANVAS_ATTRIBUTE_LAYERNODEID "layerNodeId"
163#define DEBUGCANVAS_VERB_MOVE "move"
164#define DEBUGCANVAS_VERB_LINE "line"
165#define DEBUGCANVAS_VERB_QUAD "quad"
166#define DEBUGCANVAS_VERB_CUBIC "cubic"
167#define DEBUGCANVAS_VERB_CONIC "conic"
168#define DEBUGCANVAS_VERB_CLOSE "close"
170#define DEBUGCANVAS_STYLE_FILL "fill"
171#define DEBUGCANVAS_STYLE_STROKE "stroke"
172#define DEBUGCANVAS_STYLE_STROKEANDFILL "strokeAndFill"
174#define DEBUGCANVAS_POINTMODE_POINTS "points"
175#define DEBUGCANVAS_POINTMODE_LINES "lines"
176#define DEBUGCANVAS_POINTMODE_POLYGON "polygon"
178#define DEBUGCANVAS_CLIPOP_DIFFERENCE "difference"
179#define DEBUGCANVAS_CLIPOP_INTERSECT "intersect"
181#define DEBUGCANVAS_BLURSTYLE_NORMAL "normal"
182#define DEBUGCANVAS_BLURSTYLE_SOLID "solid"
183#define DEBUGCANVAS_BLURSTYLE_OUTER "outer"
184#define DEBUGCANVAS_BLURSTYLE_INNER "inner"
186#define DEBUGCANVAS_BLURQUALITY_LOW "low"
187#define DEBUGCANVAS_BLURQUALITY_HIGH "high"
189#define DEBUGCANVAS_FILLTYPE_WINDING "winding"
190#define DEBUGCANVAS_FILLTYPE_EVENODD "evenOdd"
191#define DEBUGCANVAS_FILLTYPE_INVERSEWINDING "inverseWinding"
192#define DEBUGCANVAS_FILLTYPE_INVERSEEVENODD "inverseEvenOdd"
194#define DEBUGCANVAS_CAP_BUTT "butt"
195#define DEBUGCANVAS_CAP_ROUND "round"
196#define DEBUGCANVAS_CAP_SQUARE "square"
198#define DEBUGCANVAS_MITER_JOIN "miter"
199#define DEBUGCANVAS_ROUND_JOIN "round"
200#define DEBUGCANVAS_BEVEL_JOIN "bevel"
202#define DEBUGCANVAS_COLORTYPE_ARGB4444 "ARGB4444"
203#define DEBUGCANVAS_COLORTYPE_RGBA8888 "RGBA8888"
204#define DEBUGCANVAS_COLORTYPE_BGRA8888 "BGRA8888"
205#define DEBUGCANVAS_COLORTYPE_565 "565"
206#define DEBUGCANVAS_COLORTYPE_GRAY8 "Gray8"
207#define DEBUGCANVAS_COLORTYPE_INDEX8 "Index8"
208#define DEBUGCANVAS_COLORTYPE_ALPHA8 "Alpha8"
210#define DEBUGCANVAS_ALPHATYPE_OPAQUE "opaque"
211#define DEBUGCANVAS_ALPHATYPE_PREMUL "premul"
212#define DEBUGCANVAS_ALPHATYPE_UNPREMUL "unpremul"
213#define DEBUGCANVAS_ALPHATYPE_UNKNOWN "unknown"
215#define DEBUGCANVAS_HINTING_NONE "none"
216#define DEBUGCANVAS_HINTING_SLIGHT "slight"
217#define DEBUGCANVAS_HINTING_NORMAL "normal"
218#define DEBUGCANVAS_HINTING_FULL "full"
220#define DEBUGCANVAS_EDGING_ALIAS "alias"
221#define DEBUGCANVAS_EDGING_ANTIALIAS "antialias"
222#define DEBUGCANVAS_EDGING_SUBPIXELANTIALIAS "subpixelantialias"
224#define DEBUGCANVAS_SHADOWFLAG_TRANSPARENT_OCC "transparentOccluder"
225#define DEBUGCANVAS_SHADOWFLAG_GEOMETRIC_ONLY "geometricOnly"
294 static const SkScalar kInsetFrac = 0.9f;
308 canvas->
clear(0xFFFFFFFF);
316 xlate_and_scale_to_bounds(canvas,
bounds);
326 canvas->
clear(0xFFFFFFFF);
344 canvas->
clear(0xFFFFFFFF);
349 xlate_and_scale_to_bounds(canvas,
bounds);
360 canvas->
clear(0xFFFFFFFF);
365 xlate_and_scale_to_bounds(canvas,
bounds);
376 canvas->
clear(0xFFFFFFFF);
384 xlate_and_scale_to_bounds(canvas,
bounds);
470 for (
int r = 0; r < 3; ++r) {
472 for (
int c = 0; c < 3; ++c) {
482 for (
int r = 0; r < 4; ++r) {
484 for (
int c = 0; c < 4; ++c) {
496 path.dump(&wstream,
false);
499 static_cast<const char*
>(
data->data()),
data->size());
501 switch (
path.getFillType()) {
594 default:
SkASSERT(
false);
return "<invalid region op>";
603 default:
SkASSERT(
false);
return "<invalid point mode>";
611 if (
value != defaultValue) {
617 if (
value != defaultValue) {
624 const char* contentType,
627 return urlDataManager.
addData(
data.get(), contentType);
644 flattenable->
flatten(jsonBuffer);
673 size_t rowBytes = 4 *
image.width();
679#if defined(SK_GANESH)
682 if (!
image.readPixels(dContext, dstInfo,
buffer.get(), rowBytes, 0, 0)) {
683 SkDebugf(
"DrawCommand::flatten SkImage: readPixels failed\n");
694 if (encoded ==
nullptr) {
695 SkDebugf(
"DrawCommand::flatten SkImage: could not encode image as PNG\n");
699 auto dataPtr = encoded->
data();
701 SkDebugf(
"DrawCommand::flatten SkImage: encoding as PNG produced zero length data\n");
764 switch (
font.getEdging()) {
843 if (maskFilter !=
nullptr) {
845 if (
as_MFB(maskFilter)->asABlur(&blurRec)) {
876 if (pathEffect !=
nullptr) {
881 pathEffect->
asADash(&dashInfo);
884 for (int32_t
i = 0;
i < dashInfo.
fCount;
i++) {
903 if (typeface !=
nullptr) {
910 data,
buffer.bytesWritten(),
"application/octet-stream", urlDataManager);
921 if (flattenable !=
nullptr) {
935 paint.getStrokeMiter(),
942 apply_paint_blend_mode(
paint, writer);
976 if (
nullptr != lattice.
fBounds) {
993 for (
int row = 0; row < lattice.
fYCount + 1; row++) {
995 for (
int column = 0; column < lattice.
fXCount + 1; column++) {
1025 render_path(canvas, fPath);
1082 render_rrect(canvas, fRRect);
1096 fShader = std::move(cs);
1104 paint.setShader(fShader);
1127 switch (
m.getType()) {
1150 writeMatrixType(writer, fMatrix);
1211 canvas->
clear(0xFFFFFFFF);
1213 xlate_and_scale_to_bounds(
1227 flatten(*fImage, writer, urlDataManager);
1274 canvas->
clear(0xFFFFFFFF);
1276 xlate_and_scale_to_bounds(canvas, fDst);
1288 flatten(*fImage, writer, urlDataManager);
1314 , fConstraint(constraint) {}
1322 canvas->
clear(0xFFFFFFFF);
1324 xlate_and_scale_to_bounds(canvas, fDst);
1336 flatten(*fImage, writer, urlDataManager);
1364 , fLayerManager(layerManager)
1371 , fConstraint(constraint) {}
1380 canvas->
clear(0xFFFFFFFF);
1382 xlate_and_scale_to_bounds(canvas, fDst);
1425 canvas->
clear(0xFFFFFFFF);
1428 xlate_and_scale_to_bounds(canvas, fOval);
1457 fUseCenter = useCenter;
1462 canvas->
drawArc(fOval, fStartAngle, fSweepAngle, fUseCenter, fPaint);
1466 canvas->
clear(0xFFFFFFFF);
1469 xlate_and_scale_to_bounds(canvas, fOval);
1475 canvas->
drawArc(fOval, fStartAngle, fSweepAngle, fUseCenter,
p);
1499 canvas->
clear(0xFFFFFFFF);
1519 canvas->
clear(0xFFFFFFFF);
1539 render_path(canvas, fPath);
1560 render_region(canvas, fRegion);
1593 canvas->
concat(*fMatrix);
1598 canvas->
clear(0xFFFFFFFF);
1601 xlate_and_scale_to_bounds(canvas, fPicture->
cullRect());
1611 :
INHERITED(kEndDrawPicture_OpType), fRestore(restore) {}
1630 canvas->
clear(0xFFFFFFFF);
1636 for (
int i = 0;
i < fPts.
size(); ++
i) {
1640 xlate_and_scale_to_bounds(canvas,
bounds);
1656 for (
int i = 0;
i < fPts.
size();
i++) {
1669 , fBlob(
std::move(blob))
1683 xlate_and_scale_to_bounds(canvas,
bounds);
1704 while (!iter.
done()) {
1724 MakeJsonPoint(writer, iterPositions[
i * 2], iterPositions[
i * 2 + 1]);
1751 bounds.offset(fXPos, fYPos);
1761 memcpy(fCubics, cubics,
sizeof(fCubics));
1763 memcpy(fColors,
colors,
sizeof(fColors));
1764 fColorsPtr = fColors;
1766 fColorsPtr =
nullptr;
1768 if (texCoords !=
nullptr) {
1769 memcpy(fTexCoords, texCoords,
sizeof(fTexCoords));
1770 fTexCoordsPtr = fTexCoords;
1772 fTexCoordsPtr =
nullptr;
1778 canvas->
drawPatch(fCubics, fColorsPtr, fTexCoordsPtr, fBlendMode, fPaint);
1784 for (
int i = 0;
i < 12;
i++) {
1788 if (fColorsPtr !=
nullptr) {
1790 for (
int i = 0;
i < 4;
i++) {
1795 if (fTexCoordsPtr !=
nullptr) {
1797 for (
int i = 0;
i < 4;
i++) {
1833 render_rrect(canvas, fRRect);
1859 render_drrect(canvas, fOuter, fInner);
1884 render_shadow(canvas, fPath, fShadowRec);
1892 bool transparentOccluder =
1919 , fHasClip(
clip != nullptr)
1924 for (
int i = 0;
i < 4; ++
i) {
1946 , fConstraint(constraint) {
1947 int totalDstClipCount, totalMatrixCount;
1951 fDstClips.
reset(totalDstClipCount);
1952 std::copy_n(
dstClips, totalDstClipCount, fDstClips.
get());
1953 fPreViewMatrices.
reset(totalMatrixCount);
1961 fPreViewMatrices.
get(),
1982 , fVertices(
std::move(vertices))
2003 , fXform(xform,
count)
2036 , fPaint(rec.fPaint)
2038 , fSaveLayerFlags(rec.fSaveLayerFlags)
2039 , fBackdropScale(
SkCanvasPriv::GetBackdropScaleFactor(rec)) {}
2060 if (fBackdrop !=
nullptr) {
2062 flatten(fBackdrop.
get(), writer, urlDataManager);
2065 if (fSaveLayerFlags != 0) {
2066 SkDebugf(
"unsupported: saveLayer flags\n");
2081 writeMatrixType(writer, fMatrix);
#define DEBUGCANVAS_ATTRIBUTE_BLUR
#define DEBUGCANVAS_ATTRIBUTE_BLENDMODE
static void make_json_rrect(SkJSONWriter &writer, const SkRRect &rrect)
static const char * clipop_name(SkClipOp op)
#define DEBUGCANVAS_ATTRIBUTE_FONT
#define DEBUGCANVAS_ALPHATYPE_OPAQUE
#define DEBUGCANVAS_POINTMODE_LINES
static void apply_paint_patheffect(const SkPaint &paint, SkJSONWriter &writer, UrlDataManager &urlDataManager)
#define DEBUGCANVAS_ATTRIBUTE_LATTICEFLAGS
#define DEBUGCANVAS_ATTRIBUTE_DATA
#define DEBUGCANVAS_ATTRIBUTE_IMAGEFILTER
#define DEBUGCANVAS_ATTRIBUTE_SIGMA
#define DEBUGCANVAS_EDGING_ANTIALIAS
#define DEBUGCANVAS_ATTRIBUTE_CAP
#define DEBUGCANVAS_ATTRIBUTE_CUBICS
#define DEBUGCANVAS_ATTRIBUTE_DASHING
#define DEBUGCANVAS_ATTRIBUTE_ALPHA
#define DEBUGCANVAS_ATTRIBUTE_SRC
#define DEBUGCANVAS_VERB_CUBIC
#define DEBUGCANVAS_ATTRIBUTE_MATRIX
static const char * color_type_name(SkColorType colorType)
#define DEBUGCANVAS_CAP_SQUARE
#define DEBUGCANVAS_ATTRIBUTE_BOUNDS
#define DEBUGCANVAS_ATTRIBUTE_AUTOHINTING
#define DEBUGCANVAS_FILLTYPE_EVENODD
#define DEBUGCANVAS_ATTRIBUTE_PATHEFFECT
#define DEBUGCANVAS_ATTRIBUTE_FAKEBOLDTEXT
#define DEBUGCANVAS_ATTRIBUTE_WIDTH
#define DEBUGCANVAS_POINTMODE_POINTS
#define DEBUGCANVAS_ATTRIBUTE_SUBPIXELTEXT
#define DEBUGCANVAS_COLORTYPE_GRAY8
#define DEBUGCANVAS_ATTRIBUTE_SHADER
#define DEBUGCANVAS_ATTRIBUTE_IMAGE_INDEX
#define DEBUGCANVAS_CAP_BUTT
static void apply_font_edging(const SkFont &font, SkJSONWriter &writer)
#define DEBUGCANVAS_SHADOWFLAG_TRANSPARENT_OCC
static void store_bool(SkJSONWriter &writer, const char *key, bool value, bool defaultValue)
#define DEBUGCANVAS_COLORTYPE_565
#define DEBUGCANVAS_ATTRIBUTE_SHORTDESC
#define DEBUGCANVAS_HINTING_NORMAL
#define DEBUGCANVAS_ATTRIBUTE_LIGHTPOSITION
#define DEBUGCANVAS_ATTRIBUTE_VALUES
static void apply_font_typeface(const SkFont &font, SkJSONWriter &writer, UrlDataManager &urlDataManager)
#define DEBUGCANVAS_COLORTYPE_RGBA8888
#define DEBUGCANVAS_ATTRIBUTE_CLUSTERS
#define DEBUGCANVAS_ATTRIBUTE_TEXTURECOORDS
#define DEBUGCANVAS_ATTRIBUTE_STARTANGLE
#define DEBUGCANVAS_BLURSTYLE_SOLID
#define DEBUGCANVAS_ATTRIBUTE_LAYERNODEID
#define DEBUGCANVAS_STYLE_STROKE
#define DEBUGCANVAS_ATTRIBUTE_EDGING
#define DEBUGCANVAS_ATTRIBUTE_SWEEPANGLE
#define DEBUGCANVAS_VERB_QUAD
#define DEBUGCANVAS_FILLTYPE_INVERSEWINDING
static void apply_paint_maskfilter(const SkPaint &paint, SkJSONWriter &writer, UrlDataManager &urlDataManager)
#define DEBUGCANVAS_CLIPOP_INTERSECT
#define DEBUGCANVAS_ATTRIBUTE_HINTING
#define DEBUGCANVAS_FILLTYPE_INVERSEEVENODD
#define DEBUGCANVAS_ATTRIBUTE_LATTICE
static const char * pointmode_name(SkCanvas::PointMode mode)
#define DEBUGCANVAS_ATTRIBUTE_EMBEDDEDBITMAPTEXT
#define DEBUGCANVAS_ATTRIBUTE_NAME
#define DEBUGCANVAS_ATTRIBUTE_LIGHTRADIUS
#define DEBUGCANVAS_ATTRIBUTE_DST
#define DEBUGCANVAS_VERB_CONIC
#define DEBUGCANVAS_COLORTYPE_ARGB4444
#define DEBUGCANVAS_ATTRIBUTE_DUMP
#define DEBUGCANVAS_ATTRIBUTE_POSITIONS
#define DEBUGCANVAS_ATTRIBUTE_HEIGHT
#define DEBUGCANVAS_ATTRIBUTE_ZPLANE
#define DEBUGCANVAS_ATTRIBUTE_MASKFILTER
#define DEBUGCANVAS_ATTRIBUTE_STRICT
#define DEBUGCANVAS_STYLE_STROKEANDFILL
#define DEBUGCANVAS_ATTRIBUTE_INNER
#define DEBUGCANVAS_ATTRIBUTE_OUTER
#define DEBUGCANVAS_ATTRIBUTE_COMMAND
#define DEBUGCANVAS_HINTING_FULL
#define DEBUGCANVAS_ATTRIBUTE_REGIONOP
#define DEBUGCANVAS_ALPHATYPE_UNPREMUL
#define DEBUGCANVAS_ATTRIBUTE_PAINT
#define DEBUGCANVAS_ATTRIBUTE_COLOR
#define DEBUGCANVAS_ATTRIBUTE_LATTICEXDIVS
#define DEBUGCANVAS_ALPHATYPE_UNKNOWN
#define DEBUGCANVAS_ATTRIBUTE_TEXTSCALEX
#define DEBUGCANVAS_BLURSTYLE_INNER
#define DEBUGCANVAS_ATTRIBUTE_LATTICEYDIVS
static void MakeJsonFont(const SkFont &font, SkJSONWriter &writer, UrlDataManager &urlDataManager)
#define DEBUGCANVAS_BLURSTYLE_OUTER
#define DEBUGCANVAS_VERB_MOVE
#define DEBUGCANVAS_ATTRIBUTE_UNIQUE_ID
#define DEBUGCANVAS_POINTMODE_POLYGON
#define DEBUGCANVAS_ALPHATYPE_PREMUL
#define DEBUGCANVAS_ATTRIBUTE_BACKDROP
#define DEBUGCANVAS_ATTRIBUTE_PATH
#define DEBUGCANVAS_VERB_CLOSE
static void apply_font_hinting(const SkFont &font, SkJSONWriter &writer)
#define DEBUGCANVAS_ATTRIBUTE_SAMPLING
#define DEBUGCANVAS_ATTRIBUTE_ANTIALIAS
static SkString encode_data(const void *bytes, size_t count, const char *contentType, UrlDataManager &urlDataManager)
static void apply_paint_join(const SkPaint &paint, SkJSONWriter &writer)
static void store_scalar(SkJSONWriter &writer, const char *key, SkScalar value, SkScalar defaultValue)
#define DEBUGCANVAS_ATTRIBUTE_IMAGE
#define DEBUGCANVAS_CLIPOP_DIFFERENCE
#define DEBUGCANVAS_ATTRIBUTE_X
#define DEBUGCANVAS_MITER_JOIN
static SkString * str_append(SkString *str, const SkRect &r)
#define DEBUGCANVAS_ATTRIBUTE_SPOTCOLOR
#define DEBUGCANVAS_ATTRIBUTE_TEXT
#define DEBUGCANVAS_BLURSTYLE_NORMAL
#define DEBUGCANVAS_SHADOWFLAG_GEOMETRIC_ONLY
#define DEBUGCANVAS_ATTRIBUTE_LATTICEYCOUNT
#define DEBUGCANVAS_ATTRIBUTE_COLORFILTER
#define DEBUGCANVAS_ATTRIBUTE_POINTS
#define DEBUGCANVAS_ATTRIBUTE_STROKEMITER
#define DEBUGCANVAS_ATTRIBUTE_GLYPHS
#define DEBUGCANVAS_BEVEL_JOIN
#define DEBUGCANVAS_ATTRIBUTE_PHASE
#define DEBUGCANVAS_ATTRIBUTE_TEXTSIZE
#define DEBUGCANVAS_FILLTYPE_WINDING
static const char * alpha_type_name(SkAlphaType alphaType)
#define DEBUGCANVAS_ATTRIBUTE_REGION
#define DEBUGCANVAS_ATTRIBUTE_Y
#define DEBUGCANVAS_HINTING_NONE
#define DEBUGCANVAS_ROUND_JOIN
#define DEBUGCANVAS_ATTRIBUTE_LATTICEXCOUNT
static void apply_paint_style(const SkPaint &paint, SkJSONWriter &writer)
#define DEBUGCANVAS_ATTRIBUTE_VERBS
#define DEBUGCANVAS_ATTRIBUTE_STROKEWIDTH
#define DEBUGCANVAS_ATTRIBUTE_VISIBLE
#define DEBUGCANVAS_COLORTYPE_ALPHA8
static void apply_paint_cap(const SkPaint &paint, SkJSONWriter &writer)
#define DEBUGCANVAS_ATTRIBUTE_COLORS
#define DEBUGCANVAS_ATTRIBUTE_TYPEFACE
#define DEBUGCANVAS_ATTRIBUTE_STROKEJOIN
#define DEBUGCANVAS_ATTRIBUTE_FILLTYPE
#define DEBUGCANVAS_ATTRIBUTE_DITHER
#define DEBUGCANVAS_ATTRIBUTE_USECENTER
#define DEBUGCANVAS_ATTRIBUTE_COORDS
#define DEBUGCANVAS_ATTRIBUTE_MODE
#define DEBUGCANVAS_ATTRIBUTE_INTERVALS
#define DEBUGCANVAS_HINTING_SLIGHT
#define DEBUGCANVAS_ATTRIBUTE_RUNS
#define DEBUGCANVAS_EDGING_SUBPIXELANTIALIAS
static void apply_flattenable(const char *key, SkFlattenable *flattenable, SkJSONWriter &writer, UrlDataManager &urlDataManager)
#define DEBUGCANVAS_ATTRIBUTE_STYLE
#define DEBUGCANVAS_EDGING_ALIAS
#define DEBUGCANVAS_COLORTYPE_BGRA8888
#define DEBUGCANVAS_ATTRIBUTE_AMBIENTCOLOR
#define DEBUGCANVAS_CAP_ROUND
static void apply_paint_color(const SkPaint &paint, SkJSONWriter &writer)
#define DEBUGCANVAS_VERB_LINE
#define DEBUGCANVAS_ATTRIBUTE_LINEARTEXT
SkAssertResult(font.textToGlyphs("Hello", 5, SkTextEncoding::kUTF8, glyphs, std::size(glyphs))==count)
static GrDirectContext * GrAsDirectContext(GrContext_Base *base)
#define SkPaintDefaults_TextSize
#define SkPaintDefaults_Hinting
#define SkPaintDefaults_MiterLimit
@ kOpaque_SkAlphaType
pixel is opaque
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
#define SkDEBUGFAIL(message)
SK_API const char * SkBlendMode_Name(SkBlendMode blendMode)
@ kSrcOver
r = s + (1-sa)*d
@ kOuter_SkBlurStyle
nothing inside, fuzzy outside
@ kSolid_SkBlurStyle
solid inside, fuzzy outside
@ kInner_SkBlurStyle
fuzzy inside, nothing outside
@ kNormal_SkBlurStyle
fuzzy inside and outside
@ kARGB_4444_SkColorType
pixel with 4 bits for alpha, red, green, blue; in 16-bit word
@ kBGRA_8888_SkColorType
pixel with 8 bits for blue, green, red, alpha; in 32-bit word
@ kAlpha_8_SkColorType
pixel with alpha in 8-bit byte
@ kGray_8_SkColorType
pixel with grayscale level in 8-bit byte
@ kRGB_565_SkColorType
pixel with 5 bits red, 6 bits green, 5 bits blue, in 16-bit word
@ kRGBA_8888_SkColorType
pixel with 8 bits for red, green, blue, alpha; in 32-bit word
#define SkColorGetR(color)
#define SkColorGetG(color)
constexpr SkColor SK_ColorBLACK
#define SkColorGetA(color)
#define SkColorGetB(color)
constexpr SkColor SK_ColorWHITE
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
@ kNormal
glyph outlines modified to improve constrast
@ kNone
glyph outlines unchanged
@ kSlight
minimal modification to improve constrast
@ kFull
modifies glyph outlines for maximum constrast
static SkColorType colorType(AImageDecoder *decoder, const AImageDecoderHeaderInfo *headerInfo)
static SkImage_Base * as_IB(SkImage *image)
SK_API void sk_free(void *)
static void * sk_malloc_throw(size_t size)
SkMaskFilterBase * as_MFB(SkMaskFilter *mf)
static SkPath clip(const SkPath &path, const SkHalfPlane &plane)
static bool left(const SkPoint &p0, const SkPoint &p1)
static T * SkSafeRef(T *obj)
#define SkDoubleToScalar(x)
@ kGeometricOnly_ShadowFlag
@ kTransparentOccluder_ShadowFlag
static constexpr bool SkToBool(const T &x)
bool render(SkCanvas *canvas) const override
void execute(SkCanvas *canvas) const override
BeginDrawPictureCommand(const SkPicture *picture, const SkMatrix *matrix, const SkPaint *paint)
void execute(SkCanvas *canvas) const override
void toJSON(SkJSONWriter &writer, UrlDataManager &urlDataManager) const override
ClearCommand(SkColor color)
void toJSON(SkJSONWriter &writer, UrlDataManager &urlDataManager) const override
void execute(SkCanvas *canvas) const override
ClipPathCommand(const SkPath &path, SkClipOp op, bool doAA)
bool render(SkCanvas *canvas) const override
void toJSON(SkJSONWriter &writer, UrlDataManager &urlDataManager) const override
ClipRRectCommand(const SkRRect &rrect, SkClipOp op, bool doAA)
void execute(SkCanvas *canvas) const override
bool render(SkCanvas *canvas) const override
void toJSON(SkJSONWriter &writer, UrlDataManager &urlDataManager) const override
void execute(SkCanvas *canvas) const override
ClipRectCommand(const SkRect &rect, SkClipOp op, bool doAA)
void execute(SkCanvas *canvas) const override
ClipRegionCommand(const SkRegion ®ion, SkClipOp op)
void toJSON(SkJSONWriter &writer, UrlDataManager &urlDataManager) const override
ClipShaderCommand(sk_sp< SkShader >, SkClipOp)
void toJSON(SkJSONWriter &writer, UrlDataManager &urlDataManager) const override
bool render(SkCanvas *canvas) const override
void execute(SkCanvas *canvas) const override
void execute(SkCanvas *canvas) const override
Concat44Command(const SkM44 &matrix)
void toJSON(SkJSONWriter &writer, UrlDataManager &urlDataManager) const override
void toJSON(SkJSONWriter &writer, UrlDataManager &urlDataManager) const override
ConcatCommand(const SkMatrix &matrix)
void execute(SkCanvas *canvas) const override
sk_sp< SkImage > getLayerAsImage(const int nodeId, const int frame)
void execute(SkCanvas *canvas) const override
DrawAnnotationCommand(const SkRect &, const char key[], sk_sp< SkData > value)
void toJSON(SkJSONWriter &writer, UrlDataManager &urlDataManager) const override
void toJSON(SkJSONWriter &writer, UrlDataManager &urlDataManager) const override
DrawArcCommand(const SkRect &oval, SkScalar startAngle, SkScalar sweepAngle, bool useCenter, const SkPaint &paint)
void execute(SkCanvas *canvas) const override
bool render(SkCanvas *canvas) const override
void execute(SkCanvas *canvas) const override
DrawAtlasCommand(const SkImage *, const SkRSXform[], const SkRect[], const SkColor[], int, SkBlendMode, const SkSamplingOptions &, const SkRect *, const SkPaint *)
bool render(SkCanvas *canvas) const override
void execute(SkCanvas *canvas) const override
DrawBehindCommand(const SkPaint &paint)
void toJSON(SkJSONWriter &writer, UrlDataManager &urlDataManager) const override
static void MakeJsonMatrix44(SkJSONWriter &, const SkM44 &)
static void MakeJsonPoint3(SkJSONWriter &, const SkPoint3 &point)
static void MakeJsonPoint(SkJSONWriter &, const SkPoint &point)
static void MakeJsonColor(SkJSONWriter &, const SkColor color)
@ kDrawImageLattice_OpType
@ kDrawEdgeAAImageSet_OpType
@ kDrawImageRectLayer_OpType
@ kBeginDrawPicture_OpType
DrawCommand(OpType opType)
static void MakeJsonPaint(SkJSONWriter &, const SkPaint &paint, UrlDataManager &urlDataManager)
virtual void toJSON(SkJSONWriter &writer, UrlDataManager &urlDataManager) const
static void MakeJsonRect(SkJSONWriter &, const SkRect &rect)
static void flatten(const SkFlattenable *flattenable, SkJSONWriter &writer, UrlDataManager &urlDataManager)
static void MakeJsonSampling(SkJSONWriter &, const SkSamplingOptions &sampling)
static const char * GetCommandString(OpType type)
static void MakeJsonMatrix(SkJSONWriter &, const SkMatrix &)
static void MakeJsonIRect(SkJSONWriter &, const SkIRect &)
static void MakeJsonRegion(SkJSONWriter &, const SkRegion ®ion)
static void MakeJsonLattice(SkJSONWriter &, const SkCanvas::Lattice &lattice)
static void MakeJsonColor4f(SkJSONWriter &, const SkColor4f &color)
static void MakeJsonPath(SkJSONWriter &, const SkPath &path)
static void WritePNG(const SkBitmap &bitmap, SkWStream &out)
DrawDRRectCommand(const SkRRect &outer, const SkRRect &inner, const SkPaint &paint)
void execute(SkCanvas *canvas) const override
bool render(SkCanvas *canvas) const override
void toJSON(SkJSONWriter &writer, UrlDataManager &urlDataManager) const override
DrawDrawableCommand(SkDrawable *, const SkMatrix *)
void execute(SkCanvas *canvas) const override
void execute(SkCanvas *canvas) const override
DrawEdgeAAImageSetCommand(const SkCanvas::ImageSetEntry[], int count, const SkPoint[], const SkMatrix[], const SkSamplingOptions &, const SkPaint *, SkCanvas::SrcRectConstraint)
DrawEdgeAAQuadCommand(const SkRect &rect, const SkPoint clip[4], SkCanvas::QuadAAFlags aa, const SkColor4f &color, SkBlendMode mode)
void execute(SkCanvas *canvas) const override
void execute(SkCanvas *canvas) const override
void toJSON(SkJSONWriter &writer, UrlDataManager &urlDataManager) const override
bool render(SkCanvas *canvas) const override
uint64_t imageId(UrlDataManager &udb) const
DrawImageCommand(const SkImage *image, SkScalar left, SkScalar top, const SkSamplingOptions &, const SkPaint *paint)
uint64_t imageId(UrlDataManager &udb) const
void toJSON(SkJSONWriter &writer, UrlDataManager &urlDataManager) const override
DrawImageLatticeCommand(const SkImage *image, const SkCanvas::Lattice &lattice, const SkRect &dst, SkFilterMode, const SkPaint *paint)
bool render(SkCanvas *canvas) const override
void execute(SkCanvas *canvas) const override
void toJSON(SkJSONWriter &writer, UrlDataManager &urlDataManager) const override
bool render(SkCanvas *canvas) const override
DrawImageRectCommand(const SkImage *image, const SkRect &src, const SkRect &dst, const SkSamplingOptions &sampling, const SkPaint *paint, SkCanvas::SrcRectConstraint constraint)
uint64_t imageId(UrlDataManager &udm) const
void execute(SkCanvas *canvas) const override
void toJSON(SkJSONWriter &writer, UrlDataManager &urlDataManager) const override
bool render(SkCanvas *canvas) const override
void execute(SkCanvas *canvas) const override
DrawImageRectLayerCommand(DebugLayerManager *layerManager, const int nodeId, const int frame, const SkRect &src, const SkRect &dst, const SkSamplingOptions &sampling, const SkPaint *paint, SkCanvas::SrcRectConstraint constraint)
void toJSON(SkJSONWriter &writer, UrlDataManager &urlDataManager) const override
void execute(SkCanvas *canvas) const override
DrawOvalCommand(const SkRect &oval, const SkPaint &paint)
bool render(SkCanvas *canvas) const override
DrawPaintCommand(const SkPaint &paint)
void toJSON(SkJSONWriter &writer, UrlDataManager &urlDataManager) const override
bool render(SkCanvas *canvas) const override
void execute(SkCanvas *canvas) const override
void toJSON(SkJSONWriter &writer, UrlDataManager &urlDataManager) const override
DrawPatchCommand(const SkPoint cubics[12], const SkColor colors[4], const SkPoint texCoords[4], SkBlendMode bmode, const SkPaint &paint)
void execute(SkCanvas *canvas) const override
void execute(SkCanvas *canvas) const override
bool render(SkCanvas *canvas) const override
void toJSON(SkJSONWriter &writer, UrlDataManager &urlDataManager) const override
DrawPathCommand(const SkPath &path, const SkPaint &paint)
bool render(SkCanvas *canvas) const override
void toJSON(SkJSONWriter &writer, UrlDataManager &urlDataManager) const override
void execute(SkCanvas *canvas) const override
DrawPointsCommand(SkCanvas::PointMode mode, size_t count, const SkPoint pts[], const SkPaint &paint)
void toJSON(SkJSONWriter &writer, UrlDataManager &urlDataManager) const override
bool render(SkCanvas *canvas) const override
void execute(SkCanvas *canvas) const override
DrawRRectCommand(const SkRRect &rrect, const SkPaint &paint)
void execute(SkCanvas *canvas) const override
void toJSON(SkJSONWriter &writer, UrlDataManager &urlDataManager) const override
DrawRectCommand(const SkRect &rect, const SkPaint &paint)
bool render(SkCanvas *canvas) const override
void execute(SkCanvas *canvas) const override
void toJSON(SkJSONWriter &writer, UrlDataManager &urlDataManager) const override
DrawRegionCommand(const SkRegion ®ion, const SkPaint &paint)
bool render(SkCanvas *canvas) const override
DrawShadowCommand(const SkPath &path, const SkDrawShadowRec &rec)
void execute(SkCanvas *canvas) const override
void toJSON(SkJSONWriter &writer, UrlDataManager &urlDataManager) const override
void toJSON(SkJSONWriter &writer, UrlDataManager &urlDataManager) const override
void execute(SkCanvas *canvas) const override
DrawTextBlobCommand(sk_sp< SkTextBlob > blob, SkScalar x, SkScalar y, const SkPaint &paint)
bool render(SkCanvas *canvas) const override
DrawVerticesCommand(sk_sp< SkVertices >, SkBlendMode, const SkPaint &)
void execute(SkCanvas *canvas) const override
void execute(SkCanvas *canvas) const override
EndDrawPictureCommand(bool restore)
void execute(SkCanvas *canvas) const override
void execute(SkCanvas *canvas) const override
void execute(SkCanvas *canvas) const override
SaveLayerCommand(const SkCanvas::SaveLayerRec &)
void execute(SkCanvas *canvas) const override
void toJSON(SkJSONWriter &writer, UrlDataManager &urlDataManager) const override
void execute(SkCanvas *canvas) const override
SetM44Command(const SkM44 &matrix)
void toJSON(SkJSONWriter &writer, UrlDataManager &urlDataManager) const override
SetMatrixCommand(const SkMatrix &matrix)
void toJSON(SkJSONWriter &writer, UrlDataManager &urlDataManager) const override
void execute(SkCanvas *canvas) const override
bool installPixels(const SkImageInfo &info, void *pixels, size_t rowBytes, void(*releaseProc)(void *addr, void *context), void *context)
static SkCanvas::SaveLayerRec ScaledBackdropLayer(const SkRect *bounds, const SkPaint *paint, const SkImageFilter *backdrop, SkScalar backdropScale, SkCanvas::SaveLayerFlags saveLayerFlags, SkCanvas::FilterSpan filters={})
static void ResetClip(SkCanvas *canvas)
static void DrawBehind(SkCanvas *canvas, const SkPaint &paint)
static void GetDstClipAndMatrixCounts(const SkCanvas::ImageSetEntry set[], int count, int *totalDstClipCount, int *totalMatrixCount)
int saveLayer(const SkRect *bounds, const SkPaint *paint)
void drawRect(const SkRect &rect, const SkPaint &paint)
void drawOval(const SkRect &oval, const SkPaint &paint)
void clipRect(const SkRect &rect, SkClipOp op, bool doAntiAlias)
void drawPoints(PointMode mode, size_t count, const SkPoint pts[], const SkPaint &paint)
void drawPatch(const SkPoint cubics[12], const SkColor colors[4], const SkPoint texCoords[4], SkBlendMode mode, const SkPaint &paint)
void translate(SkScalar dx, SkScalar dy)
void drawPaint(const SkPaint &paint)
void private_draw_shadow_rec(const SkPath &, const SkDrawShadowRec &)
void drawDrawable(SkDrawable *drawable, const SkMatrix *matrix=nullptr)
void drawAnnotation(const SkRect &rect, const char key[], SkData *value)
virtual SkISize getBaseLayerSize() const
@ kStrict_SrcRectConstraint
sample only inside bounds; slower
void clipRegion(const SkRegion &deviceRgn, SkClipOp op=SkClipOp::kIntersect)
void experimental_DrawEdgeAAQuad(const SkRect &rect, const SkPoint clip[4], QuadAAFlags aaFlags, const SkColor4f &color, SkBlendMode mode)
void clear(SkColor color)
void experimental_DrawEdgeAAImageSet(const ImageSetEntry imageSet[], int cnt, const SkPoint dstClips[], const SkMatrix preViewMatrices[], const SkSamplingOptions &, const SkPaint *paint=nullptr, SrcRectConstraint constraint=kStrict_SrcRectConstraint)
void drawRRect(const SkRRect &rrect, const SkPaint &paint)
void drawArc(const SkRect &oval, SkScalar startAngle, SkScalar sweepAngle, bool useCenter, const SkPaint &paint)
void drawImageLattice(const SkImage *image, const Lattice &lattice, const SkRect &dst, SkFilterMode filter, const SkPaint *paint=nullptr)
void clipPath(const SkPath &path, SkClipOp op, bool doAntiAlias)
void drawRegion(const SkRegion ®ion, const SkPaint &paint)
void drawImageRect(const SkImage *, const SkRect &src, const SkRect &dst, const SkSamplingOptions &, const SkPaint *, SrcRectConstraint)
void drawPath(const SkPath &path, const SkPaint &paint)
void drawAtlas(const SkImage *atlas, const SkRSXform xform[], const SkRect tex[], const SkColor colors[], int count, SkBlendMode mode, const SkSamplingOptions &sampling, const SkRect *cullRect, const SkPaint *paint)
void setMatrix(const SkM44 &matrix)
void drawDRRect(const SkRRect &outer, const SkRRect &inner, const SkPaint &paint)
void scale(SkScalar sx, SkScalar sy)
void concat(const SkMatrix &matrix)
void drawPicture(const SkPicture *picture)
void clipShader(sk_sp< SkShader >, SkClipOp=SkClipOp::kIntersect)
void drawVertices(const SkVertices *vertices, SkBlendMode mode, const SkPaint &paint)
@ kLines_PointMode
draw each pair of points as a line segment
@ kPolygon_PointMode
draw the array of points as a open polygon
@ kPoints_PointMode
draw each point separately
void drawTextBlob(const SkTextBlob *blob, SkScalar x, SkScalar y, const SkPaint &paint)
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
void clipRRect(const SkRRect &rrect, SkClipOp op, bool doAntiAlias)
const void * data() const
static sk_sp< SkData > MakeWithCopy(const void *data, size_t length)
sk_sp< SkData > detachAsData()
virtual void flatten(SkWriteBuffer &) const
virtual const char * getTypeName() const =0
@ kAntiAlias
may have transparent pixels on glyph edges
@ kAlias
no transparent pixels on glyph edges
@ kSubpixelAntiAlias
glyph positioned in pixel using transparency
uint32_t uniqueID() const
SkAlphaType alphaType() const
void appendS32(int32_t value)
void appendNString(char const (&value)[N])
void beginArray(const char *name=nullptr, bool multiline=true)
void appendU32(uint32_t value)
void beginObject(const char *name=nullptr, bool multiline=true)
void appendU64(uint64_t value)
void appendFloat(float value)
void appendS64(int64_t value)
void appendBool(bool value)
void appendName(const char *name)
void appendCString(const char *value)
void appendString(const char *value, size_t size)
bool mapRect(SkRect *dst, const SkRect &src, SkApplyPerspectiveClip pc=SkApplyPerspectiveClip::kYes) const
@ kPerspective_Mask
perspective SkMatrix
@ kTranslate_Mask
translation SkMatrix
@ kScale_Mask
scale SkMatrix
@ kAffine_Mask
skew or rotate SkMatrix
@ kDefault_Cap
equivalent to kButt_Cap
@ kButt_Cap
no stroke extension
@ kStroke_Style
set to stroke geometry
@ kFill_Style
set to fill geometry
@ kStrokeAndFill_Style
sets to stroke and fill geometry
@ kDefault_Join
equivalent to kMiter_Join
@ kMiter_Join
extends to miter limit
@ kBevel_Join
connects outside edges
DashType asADash(DashInfo *info) const
@ kDash_DashType
fills in all of the info parameter
Verb next(SkPoint pts[4])
SkScalar conicWeight() const
virtual SkRect cullRect() const =0
const SkRect & rect() const
SkVector radii(Corner corner) const
@ kUpperLeft_Corner
index of top-left corner radii
@ kLowerRight_Corner
index of bottom-right corner radii
@ kUpperRight_Corner
index of top-right corner radii
@ kLowerLeft_Corner
index of bottom-left corner radii
const SkRect & getBounds() const
static void GrowToInclude(SkRect *r, const SkPoint &pt)
bool getBoundaryPath(SkPath *path) const
const SkIRect & getBounds() const
const char * c_str() const
void void void appendf(const char format[],...) SK_PRINTF_LIKE(2
const T * getMaybeNull() const
uint32_t * clusters() const
@ kHorizontal_Positioning
GlyphPositioning positioning() const
const SkPoint & offset() const
const SkScalar * pos() const
const uint16_t * glyphs() const
uint32_t glyphCount() const
uint32_t textSize() const
const SkFont & font() const
const SkRect & bounds() const
void serialize(SkWStream *, SerializeBehavior=SerializeBehavior::kIncludeDataIfLocal) const
SkString addData(SkData *, const char *contentType)
int lookupImage(const SkImage *)
void reset(size_t count=0)
SK_API bool Encode(SkWStream *dst, const SkPixmap &src, const Options &options)
unsigned useCenter Optional< SkMatrix > matrix
Optional< SkRect > bounds
PODArray< SkPoint > dstClips
sk_sp< const SkImage > image
ClipOpAndAA opAA SkRegion region
sk_sp< const SkPicture > picture
sk_sp< SkBlender > blender SkRect rect
PODArray< SkMatrix > preViewMatrices
PODArray< SkColor > colors
SkSamplingOptions sampling
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
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
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 mode
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_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 set
font
Font Metadata and Metrics.
static SkString join(const CommandLineFlags::StringArray &)
int fYCount
number of y-coordinates
const SkIRect * fBounds
source bounds to draw from
const int * fYDivs
y-axis values dividing bitmap
int fXCount
number of x-coordinates
const RectType * fRectTypes
array of fill types
const int * fXDivs
x-axis values dividing bitmap
static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at)
SkScalar fPhase
Offset into the dashed interval pattern.
int32_t fCount
Number of intervals in the dash. Should be even number.
SkScalar * fIntervals
Length of on/off intervals for dashed lines.
constexpr float y() const
constexpr float x() const
static SkRect Make(const SkISize &size)
constexpr float left() const
constexpr SkRect makeOffset(float dx, float dy) const
constexpr float top() const
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
constexpr float right() const
constexpr float bottom() const
const SkCubicResampler cubic
const SkFilterMode filter
const SkMipmapMode mipmap
std::shared_ptr< const fml::Mapping > data