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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 | 317 |
318 void SkDumpCanvas::drawRect(const SkRect& rect, const SkPaint& paint) { | 318 void SkDumpCanvas::drawRect(const SkRect& rect, const SkPaint& paint) { |
319 SkString str; | 319 SkString str; |
320 toString(rect, &str); | 320 toString(rect, &str); |
321 this->dump(kDrawRect_Verb, &paint, "drawRect(%s)", str.c_str()); | 321 this->dump(kDrawRect_Verb, &paint, "drawRect(%s)", str.c_str()); |
322 } | 322 } |
323 | 323 |
324 void SkDumpCanvas::drawRRect(const SkRRect& rrect, const SkPaint& paint) { | 324 void SkDumpCanvas::drawRRect(const SkRRect& rrect, const SkPaint& paint) { |
325 SkString str; | 325 SkString str; |
326 toString(rrect, &str); | 326 toString(rrect, &str); |
327 this->dump(kDrawRRect_Verb, &paint, "drawRRect(%s)", str.c_str()); | 327 this->dump(kDrawDRRect_Verb, &paint, "drawRRect(%s)", str.c_str()); |
| 328 } |
| 329 |
| 330 void SkDumpCanvas::onDrawDRRect(const SkRRect& outer, const SkRRect& inner, |
| 331 const SkPaint& paint) { |
| 332 SkString str0, str1; |
| 333 toString(outer, &str0); |
| 334 toString(inner, &str0); |
| 335 this->dump(kDrawRRect_Verb, &paint, "drawDRRect(%s,%s)", |
| 336 str0.c_str(), str1.c_str()); |
328 } | 337 } |
329 | 338 |
330 void SkDumpCanvas::drawPath(const SkPath& path, const SkPaint& paint) { | 339 void SkDumpCanvas::drawPath(const SkPath& path, const SkPaint& paint) { |
331 SkString str; | 340 SkString str; |
332 toString(path, &str); | 341 toString(path, &str); |
333 this->dump(kDrawPath_Verb, &paint, "drawPath(%s)", str.c_str()); | 342 this->dump(kDrawPath_Verb, &paint, "drawPath(%s)", str.c_str()); |
334 } | 343 } |
335 | 344 |
336 void SkDumpCanvas::drawBitmap(const SkBitmap& bitmap, SkScalar x, SkScalar y, | 345 void SkDumpCanvas::drawBitmap(const SkBitmap& bitmap, SkScalar x, SkScalar y, |
337 const SkPaint* paint) { | 346 const SkPaint* paint) { |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
510 | 519 |
511 /////////////////////////////////////////////////////////////////////////////// | 520 /////////////////////////////////////////////////////////////////////////////// |
512 | 521 |
513 static void dumpToDebugf(const char text[], void*) { | 522 static void dumpToDebugf(const char text[], void*) { |
514 SkDebugf("%s\n", text); | 523 SkDebugf("%s\n", text); |
515 } | 524 } |
516 | 525 |
517 SkDebugfDumper::SkDebugfDumper() : INHERITED(dumpToDebugf, NULL) {} | 526 SkDebugfDumper::SkDebugfDumper() : INHERITED(dumpToDebugf, NULL) {} |
518 | 527 |
519 #endif | 528 #endif |
OLD | NEW |