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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 } | 285 } |
286 | 286 |
287 void SkDumpCanvas::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) { | 287 void SkDumpCanvas::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) { |
288 SkString str; | 288 SkString str; |
289 toString(deviceRgn, &str); | 289 toString(deviceRgn, &str); |
290 this->dump(kClip_Verb, NULL, "clipRegion(%s %s)", str.c_str(), | 290 this->dump(kClip_Verb, NULL, "clipRegion(%s %s)", str.c_str(), |
291 toString(op)); | 291 toString(op)); |
292 this->INHERITED::onClipRegion(deviceRgn, op); | 292 this->INHERITED::onClipRegion(deviceRgn, op); |
293 } | 293 } |
294 | 294 |
295 void SkDumpCanvas::onPushCull(const SkRect& cullRect) { | |
296 SkString str; | |
297 toString(cullRect, &str); | |
298 this->dump(kCull_Verb, NULL, "pushCull(%s)", str.c_str()); | |
299 } | |
300 | |
301 void SkDumpCanvas::onPopCull() { | |
302 this->dump(kCull_Verb, NULL, "popCull()"); | |
303 } | |
304 /////////////////////////////////////////////////////////////////////////////// | 295 /////////////////////////////////////////////////////////////////////////////// |
305 | 296 |
306 void SkDumpCanvas::drawPaint(const SkPaint& paint) { | 297 void SkDumpCanvas::drawPaint(const SkPaint& paint) { |
307 this->dump(kDrawPaint_Verb, &paint, "drawPaint()"); | 298 this->dump(kDrawPaint_Verb, &paint, "drawPaint()"); |
308 } | 299 } |
309 | 300 |
310 void SkDumpCanvas::drawPoints(PointMode mode, size_t count, | 301 void SkDumpCanvas::drawPoints(PointMode mode, size_t count, |
311 const SkPoint pts[], const SkPaint& paint) { | 302 const SkPoint pts[], const SkPaint& paint) { |
312 this->dump(kDrawPoints_Verb, &paint, "drawPoints(%s, %d)", toString(mode), | 303 this->dump(kDrawPoints_Verb, &paint, "drawPoints(%s, %d)", toString(mode), |
313 count); | 304 count); |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 | 534 |
544 /////////////////////////////////////////////////////////////////////////////// | 535 /////////////////////////////////////////////////////////////////////////////// |
545 | 536 |
546 static void dumpToDebugf(const char text[], void*) { | 537 static void dumpToDebugf(const char text[], void*) { |
547 SkDebugf("%s\n", text); | 538 SkDebugf("%s\n", text); |
548 } | 539 } |
549 | 540 |
550 SkDebugfDumper::SkDebugfDumper() : INHERITED(dumpToDebugf, NULL) {} | 541 SkDebugfDumper::SkDebugfDumper() : INHERITED(dumpToDebugf, NULL) {} |
551 | 542 |
552 #endif | 543 #endif |
OLD | NEW |