• Home
  • Raw
  • Download

Lines Matching refs:writer

257 void DrawCommand::toJSON(SkJSONWriter& writer, UrlDataManager& urlDataManager) const {  in toJSON()  argument
258 writer.appendString(DEBUGCANVAS_ATTRIBUTE_COMMAND, this->GetCommandString(fOpType)); in toJSON()
259 writer.appendBool(DEBUGCANVAS_ATTRIBUTE_VISIBLE, this->isVisible()); in toJSON()
428 void apply_paint_blend_mode(const SkPaint& paint, SkJSONWriter& writer) { in apply_paint_blend_mode() argument
432 writer.appendString(DEBUGCANVAS_ATTRIBUTE_BLENDMODE, in apply_paint_blend_mode()
439 void DrawCommand::MakeJsonColor(SkJSONWriter& writer, const SkColor color) { in MakeJsonColor() argument
440 writer.beginArray(nullptr, false); in MakeJsonColor()
441 writer.appendS32(SkColorGetA(color)); in MakeJsonColor()
442 writer.appendS32(SkColorGetR(color)); in MakeJsonColor()
443 writer.appendS32(SkColorGetG(color)); in MakeJsonColor()
444 writer.appendS32(SkColorGetB(color)); in MakeJsonColor()
445 writer.endArray(); in MakeJsonColor()
448 void DrawCommand::MakeJsonColor4f(SkJSONWriter& writer, const SkColor4f& color) { in MakeJsonColor4f() argument
449 writer.beginArray(nullptr, false); in MakeJsonColor4f()
450 writer.appendFloat(color.fA); in MakeJsonColor4f()
451 writer.appendFloat(color.fR); in MakeJsonColor4f()
452 writer.appendFloat(color.fG); in MakeJsonColor4f()
453 writer.appendFloat(color.fB); in MakeJsonColor4f()
454 writer.endArray(); in MakeJsonColor4f()
457 void DrawCommand::MakeJsonPoint(SkJSONWriter& writer, const SkPoint& point) { in MakeJsonPoint() argument
458 writer.beginArray(nullptr, false); in MakeJsonPoint()
459 writer.appendFloat(point.x()); in MakeJsonPoint()
460 writer.appendFloat(point.y()); in MakeJsonPoint()
461 writer.endArray(); in MakeJsonPoint()
464 void DrawCommand::MakeJsonPoint(SkJSONWriter& writer, SkScalar x, SkScalar y) { in MakeJsonPoint() argument
465 writer.beginArray(nullptr, false); in MakeJsonPoint()
466 writer.appendFloat(x); in MakeJsonPoint()
467 writer.appendFloat(y); in MakeJsonPoint()
468 writer.endArray(); in MakeJsonPoint()
471 void DrawCommand::MakeJsonPoint3(SkJSONWriter& writer, const SkPoint3& point) { in MakeJsonPoint3() argument
472 writer.beginArray(nullptr, false); in MakeJsonPoint3()
473 writer.appendFloat(point.x()); in MakeJsonPoint3()
474 writer.appendFloat(point.y()); in MakeJsonPoint3()
475 writer.appendFloat(point.z()); in MakeJsonPoint3()
476 writer.endArray(); in MakeJsonPoint3()
479 void DrawCommand::MakeJsonRect(SkJSONWriter& writer, const SkRect& rect) { in MakeJsonRect() argument
480 writer.beginArray(nullptr, false); in MakeJsonRect()
481 writer.appendFloat(rect.left()); in MakeJsonRect()
482 writer.appendFloat(rect.top()); in MakeJsonRect()
483 writer.appendFloat(rect.right()); in MakeJsonRect()
484 writer.appendFloat(rect.bottom()); in MakeJsonRect()
485 writer.endArray(); in MakeJsonRect()
488 void DrawCommand::MakeJsonIRect(SkJSONWriter& writer, const SkIRect& rect) { in MakeJsonIRect() argument
489 writer.beginArray(nullptr, false); in MakeJsonIRect()
490 writer.appendS32(rect.left()); in MakeJsonIRect()
491 writer.appendS32(rect.top()); in MakeJsonIRect()
492 writer.appendS32(rect.right()); in MakeJsonIRect()
493 writer.appendS32(rect.bottom()); in MakeJsonIRect()
494 writer.endArray(); in MakeJsonIRect()
497 static void make_json_rrect(SkJSONWriter& writer, const SkRRect& rrect) { in make_json_rrect() argument
498 writer.beginArray(nullptr, false); in make_json_rrect()
499 DrawCommand::MakeJsonRect(writer, rrect.rect()); in make_json_rrect()
500 DrawCommand::MakeJsonPoint(writer, rrect.radii(SkRRect::kUpperLeft_Corner)); in make_json_rrect()
501 DrawCommand::MakeJsonPoint(writer, rrect.radii(SkRRect::kUpperRight_Corner)); in make_json_rrect()
502 DrawCommand::MakeJsonPoint(writer, rrect.radii(SkRRect::kLowerRight_Corner)); in make_json_rrect()
503 DrawCommand::MakeJsonPoint(writer, rrect.radii(SkRRect::kLowerLeft_Corner)); in make_json_rrect()
504 writer.endArray(); in make_json_rrect()
507 void DrawCommand::MakeJsonMatrix(SkJSONWriter& writer, const SkMatrix& matrix) { in MakeJsonMatrix() argument
508 writer.beginArray(); in MakeJsonMatrix()
510 writer.beginArray(nullptr, false); in MakeJsonMatrix()
512 writer.appendFloat(matrix[r * 3 + c]); in MakeJsonMatrix()
514 writer.endArray(); in MakeJsonMatrix()
516 writer.endArray(); in MakeJsonMatrix()
519 void DrawCommand::MakeJsonPath(SkJSONWriter& writer, const SkPath& path) { in MakeJsonPath() argument
520 writer.beginObject(); in MakeJsonPath()
523 writer.appendString(DEBUGCANVAS_ATTRIBUTE_FILLTYPE, DEBUGCANVAS_FILLTYPE_WINDING); in MakeJsonPath()
526 writer.appendString(DEBUGCANVAS_ATTRIBUTE_FILLTYPE, DEBUGCANVAS_FILLTYPE_EVENODD); in MakeJsonPath()
529 writer.appendString(DEBUGCANVAS_ATTRIBUTE_FILLTYPE, in MakeJsonPath()
533 writer.appendString(DEBUGCANVAS_ATTRIBUTE_FILLTYPE, in MakeJsonPath()
537 writer.beginArray(DEBUGCANVAS_ATTRIBUTE_VERBS); in MakeJsonPath()
543 writer.appendString(DEBUGCANVAS_VERB_CLOSE); in MakeJsonPath()
546 writer.beginObject(); // verb in MakeJsonPath()
549 writer.appendName(DEBUGCANVAS_VERB_LINE); in MakeJsonPath()
550 MakeJsonPoint(writer, pts[1]); in MakeJsonPath()
554 writer.beginArray(DEBUGCANVAS_VERB_QUAD); in MakeJsonPath()
555 MakeJsonPoint(writer, pts[1]); in MakeJsonPath()
556 MakeJsonPoint(writer, pts[2]); in MakeJsonPath()
557 writer.endArray(); // quad coords in MakeJsonPath()
561 writer.beginArray(DEBUGCANVAS_VERB_CUBIC); in MakeJsonPath()
562 MakeJsonPoint(writer, pts[1]); in MakeJsonPath()
563 MakeJsonPoint(writer, pts[2]); in MakeJsonPath()
564 MakeJsonPoint(writer, pts[3]); in MakeJsonPath()
565 writer.endArray(); // cubic coords in MakeJsonPath()
569 writer.beginArray(DEBUGCANVAS_VERB_CONIC); in MakeJsonPath()
570 MakeJsonPoint(writer, pts[1]); in MakeJsonPath()
571 MakeJsonPoint(writer, pts[2]); in MakeJsonPath()
572 writer.appendFloat(iter.conicWeight()); in MakeJsonPath()
573 writer.endArray(); // conic coords in MakeJsonPath()
577 writer.appendName(DEBUGCANVAS_VERB_MOVE); in MakeJsonPath()
578 MakeJsonPoint(writer, pts[0]); in MakeJsonPath()
586 writer.endObject(); // verb in MakeJsonPath()
588 writer.endArray(); // verbs in MakeJsonPath()
589 writer.endObject(); // path in MakeJsonPath()
592 void DrawCommand::MakeJsonRegion(SkJSONWriter& writer, const SkRegion& region) { in MakeJsonRegion() argument
596 MakeJsonPath(writer, path); in MakeJsonRegion()
620 static void store_scalar(SkJSONWriter& writer, in store_scalar() argument
625 writer.appendFloat(key, value); in store_scalar()
629 static void store_bool(SkJSONWriter& writer, const char* key, bool value, bool defaultValue) { in store_bool() argument
631 writer.appendBool(key, value); in store_bool()
644 SkJSONWriter& writer, in flatten() argument
652 writer.appendString(DEBUGCANVAS_ATTRIBUTE_NAME, flattenable->getTypeName()); in flatten()
653 writer.appendString(DEBUGCANVAS_ATTRIBUTE_DATA, url.c_str()); in flatten()
655 writer.beginObject(DEBUGCANVAS_ATTRIBUTE_VALUES); in flatten()
656 JsonWriteBuffer jsonBuffer(&writer, &urlDataManager); in flatten()
658 writer.endObject(); // values in flatten()
674 SkJSONWriter& writer, in flatten() argument
692 writer.appendString(DEBUGCANVAS_ATTRIBUTE_DATA, url.c_str()); in flatten()
718 SkJSONWriter& writer, in flatten() argument
721 writer.appendString(DEBUGCANVAS_ATTRIBUTE_COLOR, color_type_name(bitmap.colorType())); in flatten()
722 writer.appendString(DEBUGCANVAS_ATTRIBUTE_ALPHA, alpha_type_name(bitmap.alphaType())); in flatten()
723 bool success = flatten(*image, writer, urlDataManager); in flatten()
727 static void apply_font_hinting(const SkFont& font, SkJSONWriter& writer) { in apply_font_hinting() argument
732 writer.appendString(DEBUGCANVAS_ATTRIBUTE_HINTING, DEBUGCANVAS_HINTING_NONE); in apply_font_hinting()
735 writer.appendString(DEBUGCANVAS_ATTRIBUTE_HINTING, DEBUGCANVAS_HINTING_SLIGHT); in apply_font_hinting()
738 writer.appendString(DEBUGCANVAS_ATTRIBUTE_HINTING, DEBUGCANVAS_HINTING_NORMAL); in apply_font_hinting()
741 writer.appendString(DEBUGCANVAS_ATTRIBUTE_HINTING, DEBUGCANVAS_HINTING_FULL); in apply_font_hinting()
747 static void apply_font_edging(const SkFont& font, SkJSONWriter& writer) { in apply_font_edging() argument
750 writer.appendString(DEBUGCANVAS_ATTRIBUTE_EDGING, DEBUGCANVAS_EDGING_ALIAS); in apply_font_edging()
753 writer.appendString(DEBUGCANVAS_ATTRIBUTE_EDGING, DEBUGCANVAS_EDGING_ANTIALIAS); in apply_font_edging()
756 writer.appendString(DEBUGCANVAS_ATTRIBUTE_EDGING, DEBUGCANVAS_EDGING_SUBPIXELANTIALIAS); in apply_font_edging()
761 static void apply_paint_color(const SkPaint& paint, SkJSONWriter& writer) { in apply_paint_color() argument
764 writer.appendName(DEBUGCANVAS_ATTRIBUTE_COLOR); in apply_paint_color()
765 DrawCommand::MakeJsonColor(writer, color); in apply_paint_color()
769 static void apply_paint_style(const SkPaint& paint, SkJSONWriter& writer) { in apply_paint_style() argument
774 writer.appendString(DEBUGCANVAS_ATTRIBUTE_STYLE, DEBUGCANVAS_STYLE_STROKE); in apply_paint_style()
778 writer.appendString(DEBUGCANVAS_ATTRIBUTE_STYLE, DEBUGCANVAS_STYLE_STROKEANDFILL); in apply_paint_style()
786 static void apply_paint_cap(const SkPaint& paint, SkJSONWriter& writer) { in apply_paint_cap() argument
791 writer.appendString(DEBUGCANVAS_ATTRIBUTE_CAP, DEBUGCANVAS_CAP_BUTT); in apply_paint_cap()
794 writer.appendString(DEBUGCANVAS_ATTRIBUTE_CAP, DEBUGCANVAS_CAP_ROUND); in apply_paint_cap()
797 writer.appendString(DEBUGCANVAS_ATTRIBUTE_CAP, DEBUGCANVAS_CAP_SQUARE); in apply_paint_cap()
804 static void apply_paint_join(const SkPaint& paint, SkJSONWriter& writer) { in apply_paint_join() argument
809 writer.appendString(DEBUGCANVAS_ATTRIBUTE_STROKEJOIN, DEBUGCANVAS_MITER_JOIN); in apply_paint_join()
812 writer.appendString(DEBUGCANVAS_ATTRIBUTE_STROKEJOIN, DEBUGCANVAS_ROUND_JOIN); in apply_paint_join()
815 writer.appendString(DEBUGCANVAS_ATTRIBUTE_STROKEJOIN, DEBUGCANVAS_BEVEL_JOIN); in apply_paint_join()
822 static void apply_paint_filterquality(const SkPaint& paint, SkJSONWriter& writer) { in apply_paint_filterquality() argument
827 writer.appendString(DEBUGCANVAS_ATTRIBUTE_FILTERQUALITY, DEBUGCANVAS_FILTERQUALITY_LOW); in apply_paint_filterquality()
830 writer.appendString(DEBUGCANVAS_ATTRIBUTE_FILTERQUALITY, in apply_paint_filterquality()
834 writer.appendString(DEBUGCANVAS_ATTRIBUTE_FILTERQUALITY, in apply_paint_filterquality()
841 SkJSONWriter& writer, in apply_paint_maskfilter() argument
847 writer.beginObject(DEBUGCANVAS_ATTRIBUTE_BLUR); in apply_paint_maskfilter()
848 writer.appendFloat(DEBUGCANVAS_ATTRIBUTE_SIGMA, blurRec.fSigma); in apply_paint_maskfilter()
851 writer.appendString(DEBUGCANVAS_ATTRIBUTE_STYLE, DEBUGCANVAS_BLURSTYLE_NORMAL); in apply_paint_maskfilter()
854 writer.appendString(DEBUGCANVAS_ATTRIBUTE_STYLE, DEBUGCANVAS_BLURSTYLE_SOLID); in apply_paint_maskfilter()
857 writer.appendString(DEBUGCANVAS_ATTRIBUTE_STYLE, DEBUGCANVAS_BLURSTYLE_OUTER); in apply_paint_maskfilter()
860 writer.appendString(DEBUGCANVAS_ATTRIBUTE_STYLE, DEBUGCANVAS_BLURSTYLE_INNER); in apply_paint_maskfilter()
864 writer.endObject(); // blur in apply_paint_maskfilter()
866 writer.beginObject(DEBUGCANVAS_ATTRIBUTE_MASKFILTER); in apply_paint_maskfilter()
867 DrawCommand::flatten(maskFilter, writer, urlDataManager); in apply_paint_maskfilter()
868 writer.endObject(); // maskFilter in apply_paint_maskfilter()
874 SkJSONWriter& writer, in apply_paint_patheffect() argument
883 writer.beginObject(DEBUGCANVAS_ATTRIBUTE_DASHING); in apply_paint_patheffect()
884 writer.beginArray(DEBUGCANVAS_ATTRIBUTE_INTERVALS, false); in apply_paint_patheffect()
886 writer.appendFloat(dashInfo.fIntervals[i]); in apply_paint_patheffect()
888 writer.endArray(); // intervals in apply_paint_patheffect()
890 writer.appendFloat(DEBUGCANVAS_ATTRIBUTE_PHASE, dashInfo.fPhase); in apply_paint_patheffect()
891 writer.endObject(); // dashing in apply_paint_patheffect()
893 writer.beginObject(DEBUGCANVAS_ATTRIBUTE_PATHEFFECT); in apply_paint_patheffect()
894 DrawCommand::flatten(pathEffect, writer, urlDataManager); in apply_paint_patheffect()
895 writer.endObject(); // pathEffect in apply_paint_patheffect()
901 SkJSONWriter& writer, in apply_font_typeface() argument
905 writer.beginObject(DEBUGCANVAS_ATTRIBUTE_TYPEFACE); in apply_font_typeface()
912 writer.appendString(DEBUGCANVAS_ATTRIBUTE_DATA, url.c_str()); in apply_font_typeface()
914 writer.endObject(); in apply_font_typeface()
920 SkJSONWriter& writer, in apply_flattenable() argument
923 writer.beginObject(key); in apply_flattenable()
924 DrawCommand::flatten(flattenable, writer, urlDataManager); in apply_flattenable()
925 writer.endObject(); in apply_flattenable()
929 void DrawCommand::MakeJsonPaint(SkJSONWriter& writer, in MakeJsonPaint() argument
932 writer.beginObject(); in MakeJsonPaint()
933 store_scalar(writer, DEBUGCANVAS_ATTRIBUTE_STROKEWIDTH, paint.getStrokeWidth(), 0.0f); in MakeJsonPaint()
934 store_scalar(writer, in MakeJsonPaint()
938 store_bool(writer, DEBUGCANVAS_ATTRIBUTE_ANTIALIAS, paint.isAntiAlias(), false); in MakeJsonPaint()
939 store_bool(writer, DEBUGCANVAS_ATTRIBUTE_DITHER, paint.isDither(), false); in MakeJsonPaint()
941 apply_paint_color(paint, writer); in MakeJsonPaint()
942 apply_paint_style(paint, writer); in MakeJsonPaint()
943 apply_paint_blend_mode(paint, writer); in MakeJsonPaint()
944 apply_paint_cap(paint, writer); in MakeJsonPaint()
945 apply_paint_join(paint, writer); in MakeJsonPaint()
946 apply_paint_filterquality(paint, writer); in MakeJsonPaint()
947 apply_paint_patheffect(paint, writer, urlDataManager); in MakeJsonPaint()
948 apply_paint_maskfilter(paint, writer, urlDataManager); in MakeJsonPaint()
949 apply_flattenable(DEBUGCANVAS_ATTRIBUTE_SHADER, paint.getShader(), writer, urlDataManager); in MakeJsonPaint()
951 DEBUGCANVAS_ATTRIBUTE_IMAGEFILTER, paint.getImageFilter(), writer, urlDataManager); in MakeJsonPaint()
953 DEBUGCANVAS_ATTRIBUTE_COLORFILTER, paint.getColorFilter(), writer, urlDataManager); in MakeJsonPaint()
954 writer.endObject(); // paint in MakeJsonPaint()
957 static void MakeJsonFont(const SkFont& font, SkJSONWriter& writer, UrlDataManager& urlDataManager) { in MakeJsonFont() argument
958 writer.beginObject(); in MakeJsonFont()
959 store_bool(writer, DEBUGCANVAS_ATTRIBUTE_FAKEBOLDTEXT, font.isEmbolden(), false); in MakeJsonFont()
960 store_bool(writer, DEBUGCANVAS_ATTRIBUTE_LINEARTEXT, font.isLinearMetrics(), false); in MakeJsonFont()
961 store_bool(writer, DEBUGCANVAS_ATTRIBUTE_SUBPIXELTEXT, font.isSubpixel(), false); in MakeJsonFont()
962 store_bool(writer, DEBUGCANVAS_ATTRIBUTE_EMBEDDEDBITMAPTEXT, font.isEmbeddedBitmaps(), false); in MakeJsonFont()
963 store_bool(writer, DEBUGCANVAS_ATTRIBUTE_AUTOHINTING, font.isForceAutoHinting(), false); in MakeJsonFont()
965 store_scalar(writer, DEBUGCANVAS_ATTRIBUTE_TEXTSIZE, font.getSize(), SkPaintDefaults_TextSize); in MakeJsonFont()
966 store_scalar(writer, DEBUGCANVAS_ATTRIBUTE_TEXTSCALEX, font.getScaleX(), SK_Scalar1); in MakeJsonFont()
967 store_scalar(writer, DEBUGCANVAS_ATTRIBUTE_TEXTSCALEX, font.getSkewX(), 0.0f); in MakeJsonFont()
968 apply_font_edging(font, writer); in MakeJsonFont()
969 apply_font_hinting(font, writer); in MakeJsonFont()
970 apply_font_typeface(font, writer, urlDataManager); in MakeJsonFont()
971 writer.endObject(); // font in MakeJsonFont()
974 void DrawCommand::MakeJsonLattice(SkJSONWriter& writer, const SkCanvas::Lattice& lattice) { in MakeJsonLattice() argument
975 writer.beginObject(); in MakeJsonLattice()
976 writer.appendS32(DEBUGCANVAS_ATTRIBUTE_LATTICEXCOUNT, lattice.fXCount); in MakeJsonLattice()
977 writer.appendS32(DEBUGCANVAS_ATTRIBUTE_LATTICEYCOUNT, lattice.fYCount); in MakeJsonLattice()
979 writer.appendName(DEBUGCANVAS_ATTRIBUTE_BOUNDS); in MakeJsonLattice()
980 MakeJsonIRect(writer, *lattice.fBounds); in MakeJsonLattice()
982 writer.beginArray(DEBUGCANVAS_ATTRIBUTE_LATTICEXDIVS); in MakeJsonLattice()
984 writer.appendS32(lattice.fXDivs[i]); in MakeJsonLattice()
986 writer.endArray(); // xdivs in MakeJsonLattice()
987 writer.beginArray(DEBUGCANVAS_ATTRIBUTE_LATTICEYDIVS); in MakeJsonLattice()
989 writer.appendS32(lattice.fYDivs[i]); in MakeJsonLattice()
991 writer.endArray(); // ydivs in MakeJsonLattice()
993 writer.beginArray(DEBUGCANVAS_ATTRIBUTE_LATTICEFLAGS); in MakeJsonLattice()
996 writer.beginArray(); in MakeJsonLattice()
998 writer.appendS32(lattice.fRectTypes[flagCount++]); in MakeJsonLattice()
1000 writer.endArray(); // row in MakeJsonLattice()
1002 writer.endArray(); in MakeJsonLattice()
1004 writer.endObject(); in MakeJsonLattice()
1011 void ClearCommand::toJSON(SkJSONWriter& writer, UrlDataManager& urlDataManager) const { in toJSON() argument
1012 INHERITED::toJSON(writer, urlDataManager); in toJSON()
1013 writer.appendName(DEBUGCANVAS_ATTRIBUTE_COLOR); in toJSON()
1014 MakeJsonColor(writer, fColor); in toJSON()
1031 void ClipPathCommand::toJSON(SkJSONWriter& writer, UrlDataManager& urlDataManager) const { in toJSON() argument
1032 INHERITED::toJSON(writer, urlDataManager); in toJSON()
1033 writer.appendName(DEBUGCANVAS_ATTRIBUTE_PATH); in toJSON()
1034 MakeJsonPath(writer, fPath); in toJSON()
1035 writer.appendString(DEBUGCANVAS_ATTRIBUTE_REGIONOP, regionop_name(fOp)); in toJSON()
1036 writer.appendBool(DEBUGCANVAS_ATTRIBUTE_ANTIALIAS, fDoAA); in toJSON()
1047 void ClipRegionCommand::toJSON(SkJSONWriter& writer, UrlDataManager& urlDataManager) const { in toJSON() argument
1048 INHERITED::toJSON(writer, urlDataManager); in toJSON()
1049 writer.appendName(DEBUGCANVAS_ATTRIBUTE_REGION); in toJSON()
1050 MakeJsonRegion(writer, fRegion); in toJSON()
1051 writer.appendString(DEBUGCANVAS_ATTRIBUTE_REGIONOP, regionop_name(fOp)); in toJSON()
1063 void ClipRectCommand::toJSON(SkJSONWriter& writer, UrlDataManager& urlDataManager) const { in toJSON() argument
1064 INHERITED::toJSON(writer, urlDataManager); in toJSON()
1065 writer.appendName(DEBUGCANVAS_ATTRIBUTE_COORDS); in toJSON()
1066 MakeJsonRect(writer, fRect); in toJSON()
1067 writer.appendString(DEBUGCANVAS_ATTRIBUTE_REGIONOP, regionop_name(fOp)); in toJSON()
1068 writer.appendBool(DEBUGCANVAS_ATTRIBUTE_ANTIALIAS, fDoAA); in toJSON()
1071 writer.appendString(DEBUGCANVAS_ATTRIBUTE_SHORTDESC, str_append(&desc, fRect)->c_str()); in toJSON()
1088 void ClipRRectCommand::toJSON(SkJSONWriter& writer, UrlDataManager& urlDataManager) const { in toJSON() argument
1089 INHERITED::toJSON(writer, urlDataManager); in toJSON()
1090 writer.appendName(DEBUGCANVAS_ATTRIBUTE_COORDS); in toJSON()
1091 make_json_rrect(writer, fRRect); in toJSON()
1092 writer.appendString(DEBUGCANVAS_ATTRIBUTE_REGIONOP, regionop_name(fOp)); in toJSON()
1093 writer.appendBool(DEBUGCANVAS_ATTRIBUTE_ANTIALIAS, fDoAA); in toJSON()
1102 void ConcatCommand::toJSON(SkJSONWriter& writer, UrlDataManager& urlDataManager) const { in toJSON() argument
1103 INHERITED::toJSON(writer, urlDataManager); in toJSON()
1104 writer.appendName(DEBUGCANVAS_ATTRIBUTE_MATRIX); in toJSON()
1105 MakeJsonMatrix(writer, fMatrix); in toJSON()
1119 void DrawAnnotationCommand::toJSON(SkJSONWriter& writer, UrlDataManager& urlDataManager) const { in toJSON() argument
1120 INHERITED::toJSON(writer, urlDataManager); in toJSON()
1122 writer.appendName(DEBUGCANVAS_ATTRIBUTE_COORDS); in toJSON()
1123 MakeJsonRect(writer, fRect); in toJSON()
1124 writer.appendString("key", fKey.c_str()); in toJSON()
1131 writer.appendString(DEBUGCANVAS_ATTRIBUTE_SHORTDESC, desc.c_str()); in toJSON()
1151 void DrawBitmapCommand::toJSON(SkJSONWriter& writer, UrlDataManager& urlDataManager) const { in toJSON() argument
1152 INHERITED::toJSON(writer, urlDataManager); in toJSON()
1153 writer.beginObject(DEBUGCANVAS_ATTRIBUTE_BITMAP); in toJSON()
1154 flatten(fBitmap, writer, urlDataManager); in toJSON()
1155 writer.endObject(); in toJSON()
1156 writer.appendName(DEBUGCANVAS_ATTRIBUTE_COORDS); in toJSON()
1157 MakeJsonPoint(writer, fLeft, fTop); in toJSON()
1159 writer.appendName(DEBUGCANVAS_ATTRIBUTE_PAINT); in toJSON()
1160 MakeJsonPaint(writer, *fPaint, urlDataManager); in toJSON()
1188 void DrawBitmapLatticeCommand::toJSON(SkJSONWriter& writer, UrlDataManager& urlDataManager) const { in toJSON() argument
1189 INHERITED::toJSON(writer, urlDataManager); in toJSON()
1190 writer.beginObject(DEBUGCANVAS_ATTRIBUTE_BITMAP); in toJSON()
1191 flatten(fBitmap, writer, urlDataManager); in toJSON()
1192 writer.endObject(); // bitmap in toJSON()
1194 writer.appendName(DEBUGCANVAS_ATTRIBUTE_LATTICE); in toJSON()
1195 MakeJsonLattice(writer, fLattice); in toJSON()
1196 writer.appendName(DEBUGCANVAS_ATTRIBUTE_DST); in toJSON()
1197 MakeJsonRect(writer, fDst); in toJSON()
1199 writer.appendName(DEBUGCANVAS_ATTRIBUTE_PAINT); in toJSON()
1200 MakeJsonPaint(writer, *fPaint, urlDataManager); in toJSON()
1204 writer.appendString(DEBUGCANVAS_ATTRIBUTE_SHORTDESC, str_append(&desc, fDst)->c_str()); in toJSON()
1227 void DrawBitmapNineCommand::toJSON(SkJSONWriter& writer, UrlDataManager& urlDataManager) const { in toJSON() argument
1228 INHERITED::toJSON(writer, urlDataManager); in toJSON()
1229 writer.beginObject(DEBUGCANVAS_ATTRIBUTE_BITMAP); in toJSON()
1230 flatten(fBitmap, writer, urlDataManager); in toJSON()
1231 writer.endObject(); // bitmap in toJSON()
1233 writer.appendName(DEBUGCANVAS_ATTRIBUTE_CENTER); in toJSON()
1234 MakeJsonIRect(writer, fCenter); in toJSON()
1235 writer.appendName(DEBUGCANVAS_ATTRIBUTE_DST); in toJSON()
1236 MakeJsonRect(writer, fDst); in toJSON()
1238 writer.appendName(DEBUGCANVAS_ATTRIBUTE_PAINT); in toJSON()
1239 MakeJsonPaint(writer, *fPaint, urlDataManager); in toJSON()
1265 void DrawBitmapRectCommand::toJSON(SkJSONWriter& writer, UrlDataManager& urlDataManager) const { in toJSON() argument
1266 INHERITED::toJSON(writer, urlDataManager); in toJSON()
1267 writer.beginObject(DEBUGCANVAS_ATTRIBUTE_BITMAP); in toJSON()
1268 flatten(fBitmap, writer, urlDataManager); in toJSON()
1269 writer.endObject(); // bitmap in toJSON()
1272 writer.appendName(DEBUGCANVAS_ATTRIBUTE_SRC); in toJSON()
1273 MakeJsonRect(writer, *fSrc); in toJSON()
1275 writer.appendName(DEBUGCANVAS_ATTRIBUTE_DST); in toJSON()
1276 MakeJsonRect(writer, fDst); in toJSON()
1278 writer.appendName(DEBUGCANVAS_ATTRIBUTE_PAINT); in toJSON()
1279 MakeJsonPaint(writer, *fPaint, urlDataManager); in toJSON()
1282 writer.appendBool(DEBUGCANVAS_ATTRIBUTE_STRICT, true); in toJSON()
1286 writer.appendString(DEBUGCANVAS_ATTRIBUTE_SHORTDESC, str_append(&desc, fDst)->c_str()); in toJSON()
1315 void DrawImageCommand::toJSON(SkJSONWriter& writer, UrlDataManager& urlDataManager) const { in toJSON() argument
1316 INHERITED::toJSON(writer, urlDataManager); in toJSON()
1317 writer.beginObject(DEBUGCANVAS_ATTRIBUTE_IMAGE); in toJSON()
1318 flatten(*fImage, writer, urlDataManager); in toJSON()
1319 writer.endObject(); // image in toJSON()
1321 writer.appendName(DEBUGCANVAS_ATTRIBUTE_COORDS); in toJSON()
1322 MakeJsonPoint(writer, fLeft, fTop); in toJSON()
1324 writer.appendName(DEBUGCANVAS_ATTRIBUTE_PAINT); in toJSON()
1325 MakeJsonPaint(writer, *fPaint, urlDataManager); in toJSON()
1328 writer.appendU32(DEBUGCANVAS_ATTRIBUTE_UNIQUE_ID, fImage->uniqueID()); in toJSON()
1329 writer.appendS32(DEBUGCANVAS_ATTRIBUTE_WIDTH, fImage->width()); in toJSON()
1330 writer.appendS32(DEBUGCANVAS_ATTRIBUTE_HEIGHT, fImage->height()); in toJSON()
1333 writer.appendString(DEBUGCANVAS_ATTRIBUTE_ALPHA, DEBUGCANVAS_ALPHATYPE_OPAQUE); in toJSON()
1336 writer.appendString(DEBUGCANVAS_ATTRIBUTE_ALPHA, DEBUGCANVAS_ALPHATYPE_PREMUL); in toJSON()
1339 writer.appendString(DEBUGCANVAS_ATTRIBUTE_ALPHA, DEBUGCANVAS_ALPHATYPE_UNPREMUL); in toJSON()
1342 writer.appendString(DEBUGCANVAS_ATTRIBUTE_ALPHA, DEBUGCANVAS_ALPHATYPE_UNKNOWN); in toJSON()
1371 void DrawImageLatticeCommand::toJSON(SkJSONWriter& writer, UrlDataManager& urlDataManager) const { in toJSON() argument
1372 INHERITED::toJSON(writer, urlDataManager); in toJSON()
1373 writer.beginObject(DEBUGCANVAS_ATTRIBUTE_IMAGE); in toJSON()
1374 flatten(*fImage, writer, urlDataManager); in toJSON()
1375 writer.endObject(); // image in toJSON()
1377 writer.appendName(DEBUGCANVAS_ATTRIBUTE_LATTICE); in toJSON()
1378 MakeJsonLattice(writer, fLattice); in toJSON()
1379 writer.appendName(DEBUGCANVAS_ATTRIBUTE_DST); in toJSON()
1380 MakeJsonRect(writer, fDst); in toJSON()
1382 writer.appendName(DEBUGCANVAS_ATTRIBUTE_PAINT); in toJSON()
1383 MakeJsonPaint(writer, *fPaint, urlDataManager); in toJSON()
1387 writer.appendString(DEBUGCANVAS_ATTRIBUTE_SHORTDESC, str_append(&desc, fDst)->c_str()); in toJSON()
1417 void DrawImageRectCommand::toJSON(SkJSONWriter& writer, UrlDataManager& urlDataManager) const { in toJSON() argument
1418 INHERITED::toJSON(writer, urlDataManager); in toJSON()
1419 writer.beginObject(DEBUGCANVAS_ATTRIBUTE_IMAGE); in toJSON()
1420 flatten(*fImage, writer, urlDataManager); in toJSON()
1421 writer.endObject(); // image in toJSON()
1424 writer.appendName(DEBUGCANVAS_ATTRIBUTE_SRC); in toJSON()
1425 MakeJsonRect(writer, *fSrc); in toJSON()
1427 writer.appendName(DEBUGCANVAS_ATTRIBUTE_DST); in toJSON()
1428 MakeJsonRect(writer, fDst); in toJSON()
1430 writer.appendName(DEBUGCANVAS_ATTRIBUTE_PAINT); in toJSON()
1431 MakeJsonPaint(writer, *fPaint, urlDataManager); in toJSON()
1434 writer.appendBool(DEBUGCANVAS_ATTRIBUTE_STRICT, true); in toJSON()
1438 writer.appendString(DEBUGCANVAS_ATTRIBUTE_SHORTDESC, str_append(&desc, fDst)->c_str()); in toJSON()
1465 void DrawImageNineCommand::toJSON(SkJSONWriter& writer, UrlDataManager& urlDataManager) const { in toJSON() argument
1466 INHERITED::toJSON(writer, urlDataManager); in toJSON()
1467 writer.beginObject(DEBUGCANVAS_ATTRIBUTE_IMAGE); in toJSON()
1468 flatten(*fImage, writer, urlDataManager); in toJSON()
1469 writer.endObject(); // image in toJSON()
1471 writer.appendName(DEBUGCANVAS_ATTRIBUTE_CENTER); in toJSON()
1472 MakeJsonIRect(writer, fCenter); in toJSON()
1473 writer.appendName(DEBUGCANVAS_ATTRIBUTE_DST); in toJSON()
1474 MakeJsonRect(writer, fDst); in toJSON()
1476 writer.appendName(DEBUGCANVAS_ATTRIBUTE_PAINT); in toJSON()
1477 MakeJsonPaint(writer, *fPaint, urlDataManager); in toJSON()
1505 void DrawOvalCommand::toJSON(SkJSONWriter& writer, UrlDataManager& urlDataManager) const { in toJSON() argument
1506 INHERITED::toJSON(writer, urlDataManager); in toJSON()
1507 writer.appendName(DEBUGCANVAS_ATTRIBUTE_COORDS); in toJSON()
1508 MakeJsonRect(writer, fOval); in toJSON()
1509 writer.appendName(DEBUGCANVAS_ATTRIBUTE_PAINT); in toJSON()
1510 MakeJsonPaint(writer, fPaint, urlDataManager); in toJSON()
1546 void DrawArcCommand::toJSON(SkJSONWriter& writer, UrlDataManager& urlDataManager) const { in toJSON() argument
1547 INHERITED::toJSON(writer, urlDataManager); in toJSON()
1548 writer.appendName(DEBUGCANVAS_ATTRIBUTE_COORDS); in toJSON()
1549 MakeJsonRect(writer, fOval); in toJSON()
1550 writer.appendFloat(DEBUGCANVAS_ATTRIBUTE_STARTANGLE, fStartAngle); in toJSON()
1551 writer.appendFloat(DEBUGCANVAS_ATTRIBUTE_SWEEPANGLE, fSweepAngle); in toJSON()
1552 writer.appendBool(DEBUGCANVAS_ATTRIBUTE_USECENTER, fUseCenter); in toJSON()
1553 writer.appendName(DEBUGCANVAS_ATTRIBUTE_PAINT); in toJSON()
1554 MakeJsonPaint(writer, fPaint, urlDataManager); in toJSON()
1569 void DrawPaintCommand::toJSON(SkJSONWriter& writer, UrlDataManager& urlDataManager) const { in toJSON() argument
1570 INHERITED::toJSON(writer, urlDataManager); in toJSON()
1571 writer.appendName(DEBUGCANVAS_ATTRIBUTE_PAINT); in toJSON()
1572 MakeJsonPaint(writer, fPaint, urlDataManager); in toJSON()
1589 void DrawBehindCommand::toJSON(SkJSONWriter& writer, UrlDataManager& urlDataManager) const { in toJSON() argument
1590 INHERITED::toJSON(writer, urlDataManager); in toJSON()
1591 writer.appendName(DEBUGCANVAS_ATTRIBUTE_PAINT); in toJSON()
1592 MakeJsonPaint(writer, fPaint, urlDataManager); in toJSON()
1608 void DrawPathCommand::toJSON(SkJSONWriter& writer, UrlDataManager& urlDataManager) const { in toJSON() argument
1609 INHERITED::toJSON(writer, urlDataManager); in toJSON()
1610 writer.appendName(DEBUGCANVAS_ATTRIBUTE_PATH); in toJSON()
1611 MakeJsonPath(writer, fPath); in toJSON()
1612 writer.appendName(DEBUGCANVAS_ATTRIBUTE_PAINT); in toJSON()
1613 MakeJsonPaint(writer, fPaint, urlDataManager); in toJSON()
1629 void DrawRegionCommand::toJSON(SkJSONWriter& writer, UrlDataManager& urlDataManager) const { in toJSON() argument
1630 INHERITED::toJSON(writer, urlDataManager); in toJSON()
1631 writer.appendName(DEBUGCANVAS_ATTRIBUTE_REGION); in toJSON()
1632 MakeJsonRegion(writer, fRegion); in toJSON()
1633 writer.appendName(DEBUGCANVAS_ATTRIBUTE_PAINT); in toJSON()
1634 MakeJsonPaint(writer, fPaint, urlDataManager); in toJSON()
1717 void DrawPointsCommand::toJSON(SkJSONWriter& writer, UrlDataManager& urlDataManager) const { in toJSON() argument
1718 INHERITED::toJSON(writer, urlDataManager); in toJSON()
1719 writer.appendString(DEBUGCANVAS_ATTRIBUTE_MODE, pointmode_name(fMode)); in toJSON()
1720 writer.beginArray(DEBUGCANVAS_ATTRIBUTE_POINTS); in toJSON()
1722 MakeJsonPoint(writer, fPts[i]); in toJSON()
1724 writer.endArray(); // points in toJSON()
1725 writer.appendName(DEBUGCANVAS_ATTRIBUTE_PAINT); in toJSON()
1726 MakeJsonPaint(writer, fPaint, urlDataManager); in toJSON()
1757 void DrawTextBlobCommand::toJSON(SkJSONWriter& writer, UrlDataManager& urlDataManager) const { in toJSON() argument
1758 INHERITED::toJSON(writer, urlDataManager); in toJSON()
1759 writer.beginArray(DEBUGCANVAS_ATTRIBUTE_RUNS); in toJSON()
1762 writer.beginObject(); // run in toJSON()
1763 writer.beginArray(DEBUGCANVAS_ATTRIBUTE_GLYPHS); in toJSON()
1765 writer.appendU32(iter.glyphs()[i]); in toJSON()
1767 writer.endArray(); // glyphs in toJSON()
1769 writer.beginArray(DEBUGCANVAS_ATTRIBUTE_POSITIONS); in toJSON()
1774 MakeJsonPoint(writer, iterPositions[i * 2], iterPositions[i * 2 + 1]); in toJSON()
1777 writer.appendFloat(iterPositions[i]); in toJSON()
1785 writer.endArray(); // positions in toJSON()
1787 writer.appendName(DEBUGCANVAS_ATTRIBUTE_FONT); in toJSON()
1788 MakeJsonFont(iter.font(), writer, urlDataManager); in toJSON()
1789 writer.appendName(DEBUGCANVAS_ATTRIBUTE_COORDS); in toJSON()
1790 MakeJsonPoint(writer, iter.offset()); in toJSON()
1792 writer.endObject(); // run in toJSON()
1795 writer.endArray(); // runs in toJSON()
1796 writer.appendFloat(DEBUGCANVAS_ATTRIBUTE_X, fXPos); in toJSON()
1797 writer.appendFloat(DEBUGCANVAS_ATTRIBUTE_Y, fYPos); in toJSON()
1799 writer.appendName(DEBUGCANVAS_ATTRIBUTE_COORDS); in toJSON()
1800 MakeJsonRect(writer, bounds); in toJSON()
1801 writer.appendName(DEBUGCANVAS_ATTRIBUTE_PAINT); in toJSON()
1802 MakeJsonPaint(writer, fPaint, urlDataManager); in toJSON()
1807 writer.appendString(DEBUGCANVAS_ATTRIBUTE_SHORTDESC, str_append(&desc, bounds)->c_str()); in toJSON()
1836 void DrawPatchCommand::toJSON(SkJSONWriter& writer, UrlDataManager& urlDataManager) const { in toJSON() argument
1837 INHERITED::toJSON(writer, urlDataManager); in toJSON()
1838 writer.beginArray(DEBUGCANVAS_ATTRIBUTE_CUBICS); in toJSON()
1840 MakeJsonPoint(writer, fCubics[i]); in toJSON()
1842 writer.endArray(); // cubics in toJSON()
1844 writer.beginArray(DEBUGCANVAS_ATTRIBUTE_COLORS); in toJSON()
1846 MakeJsonColor(writer, fColorsPtr[i]); in toJSON()
1848 writer.endArray(); // colors in toJSON()
1851 writer.beginArray(DEBUGCANVAS_ATTRIBUTE_TEXTURECOORDS); in toJSON()
1853 MakeJsonPoint(writer, fTexCoords[i]); in toJSON()
1855 writer.endArray(); // texCoords in toJSON()
1868 void DrawRectCommand::toJSON(SkJSONWriter& writer, UrlDataManager& urlDataManager) const { in toJSON() argument
1869 INHERITED::toJSON(writer, urlDataManager); in toJSON()
1870 writer.appendName(DEBUGCANVAS_ATTRIBUTE_COORDS); in toJSON()
1871 MakeJsonRect(writer, fRect); in toJSON()
1872 writer.appendName(DEBUGCANVAS_ATTRIBUTE_PAINT); in toJSON()
1873 MakeJsonPaint(writer, fPaint, urlDataManager); in toJSON()
1876 writer.appendString(DEBUGCANVAS_ATTRIBUTE_SHORTDESC, str_append(&desc, fRect)->c_str()); in toJSON()
1892 void DrawRRectCommand::toJSON(SkJSONWriter& writer, UrlDataManager& urlDataManager) const { in toJSON() argument
1893 INHERITED::toJSON(writer, urlDataManager); in toJSON()
1894 writer.appendName(DEBUGCANVAS_ATTRIBUTE_COORDS); in toJSON()
1895 make_json_rrect(writer, fRRect); in toJSON()
1896 writer.appendName(DEBUGCANVAS_ATTRIBUTE_PAINT); in toJSON()
1897 MakeJsonPaint(writer, fPaint, urlDataManager); in toJSON()
1918 void DrawDRRectCommand::toJSON(SkJSONWriter& writer, UrlDataManager& urlDataManager) const { in toJSON() argument
1919 INHERITED::toJSON(writer, urlDataManager); in toJSON()
1920 writer.appendName(DEBUGCANVAS_ATTRIBUTE_OUTER); in toJSON()
1921 make_json_rrect(writer, fOuter); in toJSON()
1922 writer.appendName(DEBUGCANVAS_ATTRIBUTE_INNER); in toJSON()
1923 make_json_rrect(writer, fInner); in toJSON()
1924 writer.appendName(DEBUGCANVAS_ATTRIBUTE_PAINT); in toJSON()
1925 MakeJsonPaint(writer, fPaint, urlDataManager); in toJSON()
1943 void DrawShadowCommand::toJSON(SkJSONWriter& writer, UrlDataManager& urlDataManager) const { in toJSON() argument
1944 INHERITED::toJSON(writer, urlDataManager); in toJSON()
1950 writer.appendName(DEBUGCANVAS_ATTRIBUTE_PATH); in toJSON()
1951 MakeJsonPath(writer, fPath); in toJSON()
1952 writer.appendName(DEBUGCANVAS_ATTRIBUTE_ZPLANE); in toJSON()
1953 MakeJsonPoint3(writer, fShadowRec.fZPlaneParams); in toJSON()
1954 writer.appendName(DEBUGCANVAS_ATTRIBUTE_LIGHTPOSITION); in toJSON()
1955 MakeJsonPoint3(writer, fShadowRec.fLightPos); in toJSON()
1956 writer.appendFloat(DEBUGCANVAS_ATTRIBUTE_LIGHTRADIUS, fShadowRec.fLightRadius); in toJSON()
1957 writer.appendName(DEBUGCANVAS_ATTRIBUTE_AMBIENTCOLOR); in toJSON()
1958 MakeJsonColor(writer, fShadowRec.fAmbientColor); in toJSON()
1959 writer.appendName(DEBUGCANVAS_ATTRIBUTE_SPOTCOLOR); in toJSON()
1960 MakeJsonColor(writer, fShadowRec.fSpotColor); in toJSON()
1961 store_bool(writer, DEBUGCANVAS_SHADOWFLAG_TRANSPARENT_OCC, transparentOccluder, false); in toJSON()
1962 store_bool(writer, DEBUGCANVAS_SHADOWFLAG_GEOMETRIC_ONLY, geometricOnly, false); in toJSON()
2094 void SaveLayerCommand::toJSON(SkJSONWriter& writer, UrlDataManager& urlDataManager) const { in toJSON() argument
2095 INHERITED::toJSON(writer, urlDataManager); in toJSON()
2097 writer.appendName(DEBUGCANVAS_ATTRIBUTE_BOUNDS); in toJSON()
2098 MakeJsonRect(writer, *fBounds); in toJSON()
2101 writer.appendName(DEBUGCANVAS_ATTRIBUTE_PAINT); in toJSON()
2102 MakeJsonPaint(writer, *fPaint, urlDataManager); in toJSON()
2105 writer.beginObject(DEBUGCANVAS_ATTRIBUTE_BACKDROP); in toJSON()
2106 flatten(fBackdrop.get(), writer, urlDataManager); in toJSON()
2107 writer.endObject(); // backdrop in toJSON()
2121 void SetMatrixCommand::toJSON(SkJSONWriter& writer, UrlDataManager& urlDataManager) const { in toJSON() argument
2122 INHERITED::toJSON(writer, urlDataManager); in toJSON()
2123 writer.appendName(DEBUGCANVAS_ATTRIBUTE_MATRIX); in toJSON()
2124 MakeJsonMatrix(writer, fMatrix); in toJSON()