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

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

Issue 448793004: add drawPicture variant that takes a matrix and paint (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: more dummies so we can land Created 6 years, 4 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 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 } 415 }
416 416
417 void SkDumpCanvas::onDrawTextOnPath(const void* text, size_t byteLength, const S kPath& path, 417 void SkDumpCanvas::onDrawTextOnPath(const void* text, size_t byteLength, const S kPath& path,
418 const SkMatrix* matrix, const SkPaint& paint ) { 418 const SkMatrix* matrix, const SkPaint& paint ) {
419 SkString str; 419 SkString str;
420 toString(text, byteLength, paint.getTextEncoding(), &str); 420 toString(text, byteLength, paint.getTextEncoding(), &str);
421 this->dump(kDrawText_Verb, &paint, "drawTextOnPath(%s [%d])", 421 this->dump(kDrawText_Verb, &paint, "drawTextOnPath(%s [%d])",
422 str.c_str(), byteLength); 422 str.c_str(), byteLength);
423 } 423 }
424 424
425 void SkDumpCanvas::onDrawPicture(const SkPicture* picture) { 425 void SkDumpCanvas::onDrawPicture(const SkPicture* picture, const SkMatrix* matri x,
426 const SkPaint* paint) {
426 this->dump(kDrawPicture_Verb, NULL, "drawPicture(%p) %d:%d", picture, 427 this->dump(kDrawPicture_Verb, NULL, "drawPicture(%p) %d:%d", picture,
427 picture->width(), picture->height()); 428 picture->width(), picture->height());
428 fNestLevel += 1; 429 fNestLevel += 1;
429 this->INHERITED::onDrawPicture(picture); 430 this->INHERITED::onDrawPicture(picture, matrix, paint);
430 fNestLevel -= 1; 431 fNestLevel -= 1;
431 this->dump(kDrawPicture_Verb, NULL, "endPicture(%p) %d:%d", &picture, 432 this->dump(kDrawPicture_Verb, NULL, "endPicture(%p) %d:%d", &picture,
432 picture->width(), picture->height()); 433 picture->width(), picture->height());
433 } 434 }
434 435
435 void SkDumpCanvas::drawVertices(VertexMode vmode, int vertexCount, 436 void SkDumpCanvas::drawVertices(VertexMode vmode, int vertexCount,
436 const SkPoint vertices[], const SkPoint texs[], 437 const SkPoint vertices[], const SkPoint texs[],
437 const SkColor colors[], SkXfermode* xmode, 438 const SkColor colors[], SkXfermode* xmode,
438 const uint16_t indices[], int indexCount, 439 const uint16_t indices[], int indexCount,
439 const SkPaint& paint) { 440 const SkPaint& paint) {
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 533
533 /////////////////////////////////////////////////////////////////////////////// 534 ///////////////////////////////////////////////////////////////////////////////
534 535
535 static void dumpToDebugf(const char text[], void*) { 536 static void dumpToDebugf(const char text[], void*) {
536 SkDebugf("%s\n", text); 537 SkDebugf("%s\n", text);
537 } 538 }
538 539
539 SkDebugfDumper::SkDebugfDumper() : INHERITED(dumpToDebugf, NULL) {} 540 SkDebugfDumper::SkDebugfDumper() : INHERITED(dumpToDebugf, NULL) {}
540 541
541 #endif 542 #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