| 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::drawPicture(SkPicture& picture) { | 425 void SkDumpCanvas::onDrawPicture(const SkPicture* picture) { |
| 426 this->dump(kDrawPicture_Verb, NULL, "drawPicture(%p) %d:%d", &picture, | 426 this->dump(kDrawPicture_Verb, NULL, "drawPicture(%p) %d:%d", picture, |
| 427 picture.width(), picture.height()); | 427 picture->width(), picture->height()); |
| 428 fNestLevel += 1; | 428 fNestLevel += 1; |
| 429 this->INHERITED::drawPicture(picture); | 429 this->INHERITED::onDrawPicture(picture); |
| 430 fNestLevel -= 1; | 430 fNestLevel -= 1; |
| 431 this->dump(kDrawPicture_Verb, NULL, "endPicture(%p) %d:%d", &picture, | 431 this->dump(kDrawPicture_Verb, NULL, "endPicture(%p) %d:%d", &picture, |
| 432 picture.width(), picture.height()); | 432 picture->width(), picture->height()); |
| 433 } | 433 } |
| 434 | 434 |
| 435 void SkDumpCanvas::drawVertices(VertexMode vmode, int vertexCount, | 435 void SkDumpCanvas::drawVertices(VertexMode vmode, int vertexCount, |
| 436 const SkPoint vertices[], const SkPoint texs[], | 436 const SkPoint vertices[], const SkPoint texs[], |
| 437 const SkColor colors[], SkXfermode* xmode, | 437 const SkColor colors[], SkXfermode* xmode, |
| 438 const uint16_t indices[], int indexCount, | 438 const uint16_t indices[], int indexCount, |
| 439 const SkPaint& paint) { | 439 const SkPaint& paint) { |
| 440 this->dump(kDrawVertices_Verb, &paint, "drawVertices(%s [%d] %g %g ...)", | 440 this->dump(kDrawVertices_Verb, &paint, "drawVertices(%s [%d] %g %g ...)", |
| 441 toString(vmode), vertexCount, SkScalarToFloat(vertices[0].fX), | 441 toString(vmode), vertexCount, SkScalarToFloat(vertices[0].fX), |
| 442 SkScalarToFloat(vertices[0].fY)); | 442 SkScalarToFloat(vertices[0].fY)); |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 | 519 |
| 520 /////////////////////////////////////////////////////////////////////////////// | 520 /////////////////////////////////////////////////////////////////////////////// |
| 521 | 521 |
| 522 static void dumpToDebugf(const char text[], void*) { | 522 static void dumpToDebugf(const char text[], void*) { |
| 523 SkDebugf("%s\n", text); | 523 SkDebugf("%s\n", text); |
| 524 } | 524 } |
| 525 | 525 |
| 526 SkDebugfDumper::SkDebugfDumper() : INHERITED(dumpToDebugf, NULL) {} | 526 SkDebugfDumper::SkDebugfDumper() : INHERITED(dumpToDebugf, NULL) {} |
| 527 | 527 |
| 528 #endif | 528 #endif |
| OLD | NEW |