| 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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 } | 290 } |
| 291 | 291 |
| 292 bool SkDumpCanvas::clipRegion(const SkRegion& deviceRgn, SkRegion::Op op) { | 292 bool SkDumpCanvas::clipRegion(const SkRegion& deviceRgn, SkRegion::Op op) { |
| 293 SkString str; | 293 SkString str; |
| 294 toString(deviceRgn, &str); | 294 toString(deviceRgn, &str); |
| 295 this->dump(kClip_Verb, NULL, "clipRegion(%s %s)", str.c_str(), | 295 this->dump(kClip_Verb, NULL, "clipRegion(%s %s)", str.c_str(), |
| 296 toString(op)); | 296 toString(op)); |
| 297 return this->INHERITED::clipRegion(deviceRgn, op); | 297 return this->INHERITED::clipRegion(deviceRgn, op); |
| 298 } | 298 } |
| 299 | 299 |
| 300 void SkDumpCanvas::onPushCull(const SkRect& cullRect) { |
| 301 SkString str; |
| 302 toString(cullRect, &str); |
| 303 this->dump(kCull_Verb, NULL, "pushCull(%s)", str.c_str()); |
| 304 } |
| 305 |
| 306 void SkDumpCanvas::onPopCull() { |
| 307 this->dump(kCull_Verb, NULL, "popCull()"); |
| 308 } |
| 300 /////////////////////////////////////////////////////////////////////////////// | 309 /////////////////////////////////////////////////////////////////////////////// |
| 301 | 310 |
| 302 void SkDumpCanvas::drawPaint(const SkPaint& paint) { | 311 void SkDumpCanvas::drawPaint(const SkPaint& paint) { |
| 303 this->dump(kDrawPaint_Verb, &paint, "drawPaint()"); | 312 this->dump(kDrawPaint_Verb, &paint, "drawPaint()"); |
| 304 } | 313 } |
| 305 | 314 |
| 306 void SkDumpCanvas::drawPoints(PointMode mode, size_t count, | 315 void SkDumpCanvas::drawPoints(PointMode mode, size_t count, |
| 307 const SkPoint pts[], const SkPaint& paint) { | 316 const SkPoint pts[], const SkPaint& paint) { |
| 308 this->dump(kDrawPoints_Verb, &paint, "drawPoints(%s, %d)", toString(mode), | 317 this->dump(kDrawPoints_Verb, &paint, "drawPoints(%s, %d)", toString(mode), |
| 309 count); | 318 count); |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 | 528 |
| 520 /////////////////////////////////////////////////////////////////////////////// | 529 /////////////////////////////////////////////////////////////////////////////// |
| 521 | 530 |
| 522 static void dumpToDebugf(const char text[], void*) { | 531 static void dumpToDebugf(const char text[], void*) { |
| 523 SkDebugf("%s\n", text); | 532 SkDebugf("%s\n", text); |
| 524 } | 533 } |
| 525 | 534 |
| 526 SkDebugfDumper::SkDebugfDumper() : INHERITED(dumpToDebugf, NULL) {} | 535 SkDebugfDumper::SkDebugfDumper() : INHERITED(dumpToDebugf, NULL) {} |
| 527 | 536 |
| 528 #endif | 537 #endif |
| OLD | NEW |