| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "SkData.h" | 8 #include "SkData.h" |
| 9 #include "SkDumpCanvas.h" | 9 #include "SkDumpCanvas.h" |
| 10 #include "SkPatchUtils.h" | 10 #include "SkPatchUtils.h" |
| (...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 534 tab.append("\t"); | 534 tab.append("\t"); |
| 535 #else | 535 #else |
| 536 tab.append(" "); // tabs are often too wide to be useful | 536 tab.append(" "); // tabs are often too wide to be useful |
| 537 #endif | 537 #endif |
| 538 } | 538 } |
| 539 msg.printf("%s%s", tab.c_str(), str); | 539 msg.printf("%s%s", tab.c_str(), str); |
| 540 | 540 |
| 541 if (p) { | 541 if (p) { |
| 542 msg.appendf(" color:0x%08X flags:%X", p->getColor(), p->getFlags()); | 542 msg.appendf(" color:0x%08X flags:%X", p->getColor(), p->getFlags()); |
| 543 if (!p->isSrcOver()) { | 543 if (!p->isSrcOver()) { |
| 544 msg.appendf(" blendmode:%d", p->getBlendMode()); | 544 msg.appendf(" blendmode:%d", (int)p->getBlendMode()); |
| 545 } | 545 } |
| 546 appendFlattenable(&msg, p->getShader(), "shader"); | 546 appendFlattenable(&msg, p->getShader(), "shader"); |
| 547 appendFlattenable(&msg, p->getPathEffect(), "pathEffect"); | 547 appendFlattenable(&msg, p->getPathEffect(), "pathEffect"); |
| 548 appendFlattenable(&msg, p->getMaskFilter(), "maskFilter"); | 548 appendFlattenable(&msg, p->getMaskFilter(), "maskFilter"); |
| 549 appendFlattenable(&msg, p->getPathEffect(), "pathEffect"); | 549 appendFlattenable(&msg, p->getPathEffect(), "pathEffect"); |
| 550 appendFlattenable(&msg, p->getColorFilter(), "filter"); | 550 appendFlattenable(&msg, p->getColorFilter(), "filter"); |
| 551 | 551 |
| 552 if (SkDumpCanvas::kDrawText_Verb == verb) { | 552 if (SkDumpCanvas::kDrawText_Verb == verb) { |
| 553 msg.appendf(" textSize:%g", SkScalarToFloat(p->getTextSize())); | 553 msg.appendf(" textSize:%g", SkScalarToFloat(p->getTextSize())); |
| 554 appendPtr(&msg, p->getTypeface(), "typeface"); | 554 appendPtr(&msg, p->getTypeface(), "typeface"); |
| 555 } | 555 } |
| 556 | 556 |
| 557 if (p->getStyle() != SkPaint::kFill_Style) { | 557 if (p->getStyle() != SkPaint::kFill_Style) { |
| 558 msg.appendf(" strokeWidth:%g", SkScalarToFloat(p->getStrokeWidth()))
; | 558 msg.appendf(" strokeWidth:%g", SkScalarToFloat(p->getStrokeWidth()))
; |
| 559 } | 559 } |
| 560 } | 560 } |
| 561 | 561 |
| 562 fProc(msg.c_str(), fRefcon); | 562 fProc(msg.c_str(), fRefcon); |
| 563 } | 563 } |
| 564 | 564 |
| 565 /////////////////////////////////////////////////////////////////////////////// | 565 /////////////////////////////////////////////////////////////////////////////// |
| 566 | 566 |
| 567 static void dumpToDebugf(const char text[], void*) { | 567 static void dumpToDebugf(const char text[], void*) { |
| 568 SkDebugf("%s\n", text); | 568 SkDebugf("%s\n", text); |
| 569 } | 569 } |
| 570 | 570 |
| 571 SkDebugfDumper::SkDebugfDumper() : INHERITED(dumpToDebugf, nullptr) {} | 571 SkDebugfDumper::SkDebugfDumper() : INHERITED(dumpToDebugf, nullptr) {} |
| OLD | NEW |