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

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

Issue 429343004: Stopped skipping tests in dm of SkPatch (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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
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 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
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));
443 } 443 }
444 444
445 void SkDumpCanvas::drawPatch(const SkPatch& patch, const SkPaint& paint) {
446 const SkPoint* points = patch.getControlPoints();
robertphillips 2014/08/04 18:44:19 dump corner colors too?
dandov 2014/08/04 19:59:27 Done. Is 4 points out of the 12 enough? or should
447 this->dump(kDrawPatch_Verb, &paint, "drawPatch([%f, %f], [%f, %f], [%f, %f], [%f, %f]...)",
448 points[0].fX, points[0].fY, points[1].fX, points[1].fY, points[2] .fX, points[2].fY,
449 points[3].fX, points[3].fY);
450 }
451
445 void SkDumpCanvas::drawData(const void* data, size_t length) { 452 void SkDumpCanvas::drawData(const void* data, size_t length) {
446 // this->dump(kDrawData_Verb, NULL, "drawData(%d)", length); 453 // this->dump(kDrawData_Verb, NULL, "drawData(%d)", length);
447 this->dump(kDrawData_Verb, NULL, "drawData(%d) %.*s", length, 454 this->dump(kDrawData_Verb, NULL, "drawData(%d) %.*s", length,
448 SkTMin<size_t>(length, 64), data); 455 SkTMin<size_t>(length, 64), data);
449 } 456 }
450 457
451 void SkDumpCanvas::beginCommentGroup(const char* description) { 458 void SkDumpCanvas::beginCommentGroup(const char* description) {
452 this->dump(kBeginCommentGroup_Verb, NULL, "beginCommentGroup(%s)", descripti on); 459 this->dump(kBeginCommentGroup_Verb, NULL, "beginCommentGroup(%s)", descripti on);
453 } 460 }
454 461
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 526
520 /////////////////////////////////////////////////////////////////////////////// 527 ///////////////////////////////////////////////////////////////////////////////
521 528
522 static void dumpToDebugf(const char text[], void*) { 529 static void dumpToDebugf(const char text[], void*) {
523 SkDebugf("%s\n", text); 530 SkDebugf("%s\n", text);
524 } 531 }
525 532
526 SkDebugfDumper::SkDebugfDumper() : INHERITED(dumpToDebugf, NULL) {} 533 SkDebugfDumper::SkDebugfDumper() : INHERITED(dumpToDebugf, NULL) {}
527 534
528 #endif 535 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698