| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #include "SkDumpCanvas.h" | 9 #include "SkDumpCanvas.h" |
| 10 | 10 |
| (...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 void SkDumpCanvas::onDrawPosTextH(const void* text, size_t byteLength, const SkS
calar xpos[], | 425 void SkDumpCanvas::onDrawPosTextH(const void* text, size_t byteLength, const SkS
calar xpos[], |
| 426 SkScalar constY, const SkPaint& paint) { | 426 SkScalar constY, const SkPaint& paint) { |
| 427 SkString str; | 427 SkString str; |
| 428 toString(text, byteLength, paint.getTextEncoding(), &str); | 428 toString(text, byteLength, paint.getTextEncoding(), &str); |
| 429 this->dump(kDrawText_Verb, &paint, "drawPosTextH(%s [%d] %g %g ...)", | 429 this->dump(kDrawText_Verb, &paint, "drawPosTextH(%s [%d] %g %g ...)", |
| 430 str.c_str(), byteLength, SkScalarToFloat(xpos[0]), | 430 str.c_str(), byteLength, SkScalarToFloat(xpos[0]), |
| 431 SkScalarToFloat(constY)); | 431 SkScalarToFloat(constY)); |
| 432 } | 432 } |
| 433 | 433 |
| 434 void SkDumpCanvas::onDrawTextOnPath(const void* text, size_t byteLength, const S
kPath& path, | 434 void SkDumpCanvas::onDrawTextOnPath(const void* text, size_t byteLength, const S
kPath& path, |
| 435 const SkMatrix* matrix, const SkPaint& paint
) { | 435 const SkMatrix* matrix, |
| 436 SK_SUPPORT_LEGACY_DRAWTEXTONPATH_PARAM const
SkPaint& paint) { |
| 436 SkString str; | 437 SkString str; |
| 437 toString(text, byteLength, paint.getTextEncoding(), &str); | 438 toString(text, byteLength, paint.getTextEncoding(), &str); |
| 438 this->dump(kDrawText_Verb, &paint, "drawTextOnPath(%s [%d])", | 439 this->dump(kDrawText_Verb, &paint, "drawTextOnPath(%s [%d])", str.c_str(), b
yteLength); |
| 439 str.c_str(), byteLength); | |
| 440 } | 440 } |
| 441 | 441 |
| 442 void SkDumpCanvas::onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y
, | 442 void SkDumpCanvas::onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y
, |
| 443 const SkPaint& paint) { | 443 const SkPaint& paint) { |
| 444 SkString str; | 444 SkString str; |
| 445 toString(blob->bounds(), &str); | 445 toString(blob->bounds(), &str); |
| 446 this->dump(kDrawText_Verb, &paint, "drawTextBlob(%p) [%s]", blob, str.c_str(
)); | 446 this->dump(kDrawText_Verb, &paint, "drawTextBlob(%p) [%s]", blob, str.c_str(
)); |
| 447 // FIXME: dump the actual blob content? | 447 // FIXME: dump the actual blob content? |
| 448 } | 448 } |
| 449 | 449 |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 561 | 561 |
| 562 /////////////////////////////////////////////////////////////////////////////// | 562 /////////////////////////////////////////////////////////////////////////////// |
| 563 | 563 |
| 564 static void dumpToDebugf(const char text[], void*) { | 564 static void dumpToDebugf(const char text[], void*) { |
| 565 SkDebugf("%s\n", text); | 565 SkDebugf("%s\n", text); |
| 566 } | 566 } |
| 567 | 567 |
| 568 SkDebugfDumper::SkDebugfDumper() : INHERITED(dumpToDebugf, NULL) {} | 568 SkDebugfDumper::SkDebugfDumper() : INHERITED(dumpToDebugf, NULL) {} |
| 569 | 569 |
| 570 #endif | 570 #endif |
| OLD | NEW |