| 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 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 this->dump(kDrawPoints_Verb, &paint, "drawPoints(%s, %d)", toString(mode), | 315 this->dump(kDrawPoints_Verb, &paint, "drawPoints(%s, %d)", toString(mode), |
| 316 count); | 316 count); |
| 317 } | 317 } |
| 318 | 318 |
| 319 void SkDumpCanvas::drawOval(const SkRect& rect, const SkPaint& paint) { | 319 void SkDumpCanvas::drawOval(const SkRect& rect, const SkPaint& paint) { |
| 320 SkString str; | 320 SkString str; |
| 321 toString(rect, &str); | 321 toString(rect, &str); |
| 322 this->dump(kDrawOval_Verb, &paint, "drawOval(%s)", str.c_str()); | 322 this->dump(kDrawOval_Verb, &paint, "drawOval(%s)", str.c_str()); |
| 323 } | 323 } |
| 324 | 324 |
| 325 void SkDumpCanvas::drawRect(const SkRect& rect, const SkPaint& paint) { | 325 void SkDumpCanvas::onDrawRect(const SkRect& rect, const SkPaint& paint) { |
| 326 SkString str; | 326 SkString str; |
| 327 toString(rect, &str); | 327 toString(rect, &str); |
| 328 this->dump(kDrawRect_Verb, &paint, "drawRect(%s)", str.c_str()); | 328 this->dump(kDrawRect_Verb, &paint, "drawRect(%s)", str.c_str()); |
| 329 } | 329 } |
| 330 | 330 |
| 331 void SkDumpCanvas::drawRRect(const SkRRect& rrect, const SkPaint& paint) { | 331 void SkDumpCanvas::drawRRect(const SkRRect& rrect, const SkPaint& paint) { |
| 332 SkString str; | 332 SkString str; |
| 333 toString(rrect, &str); | 333 toString(rrect, &str); |
| 334 this->dump(kDrawRRect_Verb, &paint, "drawRRect(%s)", str.c_str()); | 334 this->dump(kDrawRRect_Verb, &paint, "drawRRect(%s)", str.c_str()); |
| 335 } | 335 } |
| 336 | 336 |
| 337 void SkDumpCanvas::drawPath(const SkPath& path, const SkPaint& paint) { | 337 void SkDumpCanvas::onDrawPath(const SkPath& path, const SkPaint& paint) { |
| 338 SkString str; | 338 SkString str; |
| 339 toString(path, &str); | 339 toString(path, &str); |
| 340 this->dump(kDrawPath_Verb, &paint, "drawPath(%s)", str.c_str()); | 340 this->dump(kDrawPath_Verb, &paint, "drawPath(%s)", str.c_str()); |
| 341 } | 341 } |
| 342 | 342 |
| 343 void SkDumpCanvas::drawBitmap(const SkBitmap& bitmap, SkScalar x, SkScalar y, | 343 void SkDumpCanvas::drawBitmap(const SkBitmap& bitmap, SkScalar x, SkScalar y, |
| 344 const SkPaint* paint) { | 344 const SkPaint* paint) { |
| 345 SkString str; | 345 SkString str; |
| 346 bitmap.toString(&str); | 346 bitmap.toString(&str); |
| 347 this->dump(kDrawBitmap_Verb, paint, "drawBitmap(%s %g %g)", str.c_str(), | 347 this->dump(kDrawBitmap_Verb, paint, "drawBitmap(%s %g %g)", str.c_str(), |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 517 | 517 |
| 518 /////////////////////////////////////////////////////////////////////////////// | 518 /////////////////////////////////////////////////////////////////////////////// |
| 519 | 519 |
| 520 static void dumpToDebugf(const char text[], void*) { | 520 static void dumpToDebugf(const char text[], void*) { |
| 521 SkDebugf("%s\n", text); | 521 SkDebugf("%s\n", text); |
| 522 } | 522 } |
| 523 | 523 |
| 524 SkDebugfDumper::SkDebugfDumper() : INHERITED(dumpToDebugf, NULL) {} | 524 SkDebugfDumper::SkDebugfDumper() : INHERITED(dumpToDebugf, NULL) {} |
| 525 | 525 |
| 526 #endif | 526 #endif |
| OLD | NEW |