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

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

Issue 174593003: override new virtual onDrawDRRect in util canvas subclasses (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 10 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
« no previous file with comments | « src/utils/SkDeferredCanvas.cpp ('k') | src/utils/SkLuaCanvas.cpp » ('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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « src/utils/SkDeferredCanvas.cpp ('k') | src/utils/SkLuaCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698