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

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

Issue 1842753002: Style bikeshed - remove extraneous whitespace (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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/SkCanvasStack.cpp ('k') | src/utils/SkInterpolator.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
2 /* 1 /*
3 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
4 * 3 *
5 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 5 * found in the LICENSE file.
7 */ 6 */
8 7
9 #include "SkDumpCanvas.h" 8 #include "SkDumpCanvas.h"
10 9
11 #ifdef SK_DEVELOPER 10 #ifdef SK_DEVELOPER
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 image->toString(&bs); 385 image->toString(&bs);
387 toString(dst, &rs); 386 toString(dst, &rs);
388 // show the src-rect only if its not everything 387 // show the src-rect only if its not everything
389 if (src && (src->fLeft > 0 || src->fTop > 0 || 388 if (src && (src->fLeft > 0 || src->fTop > 0 ||
390 src->fRight < SkIntToScalar(image->width()) || 389 src->fRight < SkIntToScalar(image->width()) ||
391 src->fBottom < SkIntToScalar(image->height()))) { 390 src->fBottom < SkIntToScalar(image->height()))) {
392 SkString ss; 391 SkString ss;
393 toString(*src, &ss); 392 toString(*src, &ss);
394 rs.prependf("%s ", ss.c_str()); 393 rs.prependf("%s ", ss.c_str());
395 } 394 }
396 395
397 this->dump(kDrawBitmap_Verb, paint, "drawImageRectToRect(%s %s)", 396 this->dump(kDrawBitmap_Verb, paint, "drawImageRectToRect(%s %s)",
398 bs.c_str(), rs.c_str()); 397 bs.c_str(), rs.c_str());
399 } 398 }
400 399
401 void SkDumpCanvas::onDrawText(const void* text, size_t byteLength, SkScalar x, S kScalar y, 400 void SkDumpCanvas::onDrawText(const void* text, size_t byteLength, SkScalar x, S kScalar y,
402 const SkPaint& paint) { 401 const SkPaint& paint) {
403 SkString str; 402 SkString str;
404 toString(text, byteLength, paint.getTextEncoding(), &str); 403 toString(text, byteLength, paint.getTextEncoding(), &str);
405 this->dump(kDrawText_Verb, &paint, "drawText(%s [%d] %g %g)", str.c_str(), 404 this->dump(kDrawText_Verb, &paint, "drawText(%s [%d] %g %g)", str.c_str(),
406 byteLength, SkScalarToFloat(x), SkScalarToFloat(y)); 405 byteLength, SkScalarToFloat(x), SkScalarToFloat(y));
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 548
550 /////////////////////////////////////////////////////////////////////////////// 549 ///////////////////////////////////////////////////////////////////////////////
551 550
552 static void dumpToDebugf(const char text[], void*) { 551 static void dumpToDebugf(const char text[], void*) {
553 SkDebugf("%s\n", text); 552 SkDebugf("%s\n", text);
554 } 553 }
555 554
556 SkDebugfDumper::SkDebugfDumper() : INHERITED(dumpToDebugf, nullptr) {} 555 SkDebugfDumper::SkDebugfDumper() : INHERITED(dumpToDebugf, nullptr) {}
557 556
558 #endif 557 #endif
OLDNEW
« no previous file with comments | « src/utils/SkCanvasStack.cpp ('k') | src/utils/SkInterpolator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698