Home | History | Annotate | Download | only in gpu

Lines Matching refs:json

10 void GrAuditTrail::JsonifyTArray(SkString* json, const char* name, const FrameArray& array,
14 json->appendf(",");
16 json->appendf("\"%s\": [", name);
18 json->append(array[i]->toJson());
20 json->append(",");
23 json->append("]");
27 // This will pretty print a very small subset of json
32 SkString prettify(const SkString& json) {
37 for (size_t i = 0; i < json.size(); i++) {
38 if ('[' == json[i] || '{' == json[i]) {
40 this->appendChar(json[i]);
43 } else if (']' == json[i] || '}' == json[i]) {
46 this->appendChar(json[i]);
48 } else if (',' == json[i]) {
49 this->appendChar(json[i]);
52 this->appendChar(json[i]);
89 static SkString pretty_print_json(SkString json) {
91 return prettyPrintJson.prettify(json);
95 SkString json;
96 json.append("{");
97 JsonifyTArray(&json, "Stacks", fFrames, false);
98 json.append("}");
101 return pretty_print_json(json);
103 return json;
108 SkString json;
109 json.append("{");
110 json.appendf("\"Name\": \"%s\"", fName);
111 JsonifyTArray(&json, "Frames", fChildren, true);
112 json.append("}");
113 return json;
117 SkString json;
118 json.append("{");
119 json.appendf("\"Name\": \"%s\",", fName);
120 json.append("\"Bounds\": {");
121 json.appendf("\"Left\": %f,", fBounds.fLeft);
122 json.appendf("\"Right\": %f,", fBounds.fRight);
123 json.appendf("\"Top\": %f,", fBounds.fTop);
124 json.appendf("\"Bottom\": %f", fBounds.fBottom);
125 json.append("}");
126 json.append("}");
127 return json;