Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: src/utils/SkDumpCanvas.cpp

Issue 138013009: Culling API (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Updated per comments. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/core/SkPictureRecord.cpp ('k') | src/utils/debugger/SkDebugCanvas.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/core/SkPictureRecord.cpp ('k') | src/utils/debugger/SkDebugCanvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698