| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |