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

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

Issue 2130643004: drawTextRSXform (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update util canvases Created 4 years, 5 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
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * 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
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkData.h" 8 #include "SkData.h"
9 #include "SkDumpCanvas.h" 9 #include "SkDumpCanvas.h"
10 #include "SkPatchUtils.h" 10 #include "SkPatchUtils.h"
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 } 422 }
423 423
424 void SkDumpCanvas::onDrawTextOnPath(const void* text, size_t byteLength, const S kPath& path, 424 void SkDumpCanvas::onDrawTextOnPath(const void* text, size_t byteLength, const S kPath& path,
425 const SkMatrix* matrix, const SkPaint& paint ) { 425 const SkMatrix* matrix, const SkPaint& paint ) {
426 SkString str; 426 SkString str;
427 toString(text, byteLength, paint.getTextEncoding(), &str); 427 toString(text, byteLength, paint.getTextEncoding(), &str);
428 this->dump(kDrawText_Verb, &paint, "drawTextOnPath(%s [%d])", 428 this->dump(kDrawText_Verb, &paint, "drawTextOnPath(%s [%d])",
429 str.c_str(), byteLength); 429 str.c_str(), byteLength);
430 } 430 }
431 431
432 void SkDumpCanvas::onDrawTextRSXform(const void* text, size_t byteLength, const SkRSXform xform[],
433 const SkRect* cull, const SkPaint& paint) {
434 SkString str;
435 toString(text, byteLength, paint.getTextEncoding(), &str);
436 this->dump(kDrawText_Verb, &paint, "drawTextRSXform(%s [%d])",
437 str.c_str(), byteLength);
438 }
439
432 void SkDumpCanvas::onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y , 440 void SkDumpCanvas::onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y ,
433 const SkPaint& paint) { 441 const SkPaint& paint) {
434 SkString str; 442 SkString str;
435 toString(blob->bounds(), &str); 443 toString(blob->bounds(), &str);
436 this->dump(kDrawText_Verb, &paint, "drawTextBlob(%p) [%s]", blob, str.c_str( )); 444 this->dump(kDrawText_Verb, &paint, "drawTextBlob(%p) [%s]", blob, str.c_str( ));
437 // FIXME: dump the actual blob content? 445 // FIXME: dump the actual blob content?
438 } 446 }
439 447
440 void SkDumpCanvas::onDrawPicture(const SkPicture* picture, const SkMatrix* matri x, 448 void SkDumpCanvas::onDrawPicture(const SkPicture* picture, const SkMatrix* matri x,
441 const SkPaint* paint) { 449 const SkPaint* paint) {
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 fProc(msg.c_str(), fRefcon); 552 fProc(msg.c_str(), fRefcon);
545 } 553 }
546 554
547 /////////////////////////////////////////////////////////////////////////////// 555 ///////////////////////////////////////////////////////////////////////////////
548 556
549 static void dumpToDebugf(const char text[], void*) { 557 static void dumpToDebugf(const char text[], void*) {
550 SkDebugf("%s\n", text); 558 SkDebugf("%s\n", text);
551 } 559 }
552 560
553 SkDebugfDumper::SkDebugfDumper() : INHERITED(dumpToDebugf, nullptr) {} 561 SkDebugfDumper::SkDebugfDumper() : INHERITED(dumpToDebugf, nullptr) {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698