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

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: Added number of points and colors constants 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();
447 const SkColor* color = patch.getColors();
448 this->dump(kDrawPatch_Verb, &paint, "drawPatch(Vertices{[%f, %f], [%f, %f], [%f, %f], [%f, %f]}\
egdaniel 2014/08/04 20:45:38 I would say you should be fine with just the corne
dandov 2014/08/04 21:47:54 Done.
449 | Colors{[0x%x], [0x%x], [0x%x], [0x%x]})",
450 points[0].fX, points[0].fY, points[1].fX, points[1].fY, points[2] .fX, points[2].fY,
451 points[3].fX, points[3].fY, color[0], color[1], color[2], color[3 ]);
452 }
453
445 void SkDumpCanvas::drawData(const void* data, size_t length) { 454 void SkDumpCanvas::drawData(const void* data, size_t length) {
446 // this->dump(kDrawData_Verb, NULL, "drawData(%d)", length); 455 // this->dump(kDrawData_Verb, NULL, "drawData(%d)", length);
447 this->dump(kDrawData_Verb, NULL, "drawData(%d) %.*s", length, 456 this->dump(kDrawData_Verb, NULL, "drawData(%d) %.*s", length,
448 SkTMin<size_t>(length, 64), data); 457 SkTMin<size_t>(length, 64), data);
449 } 458 }
450 459
451 void SkDumpCanvas::beginCommentGroup(const char* description) { 460 void SkDumpCanvas::beginCommentGroup(const char* description) {
452 this->dump(kBeginCommentGroup_Verb, NULL, "beginCommentGroup(%s)", descripti on); 461 this->dump(kBeginCommentGroup_Verb, NULL, "beginCommentGroup(%s)", descripti on);
453 } 462 }
454 463
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 528
520 /////////////////////////////////////////////////////////////////////////////// 529 ///////////////////////////////////////////////////////////////////////////////
521 530
522 static void dumpToDebugf(const char text[], void*) { 531 static void dumpToDebugf(const char text[], void*) {
523 SkDebugf("%s\n", text); 532 SkDebugf("%s\n", text);
524 } 533 }
525 534
526 SkDebugfDumper::SkDebugfDumper() : INHERITED(dumpToDebugf, NULL) {} 535 SkDebugfDumper::SkDebugfDumper() : INHERITED(dumpToDebugf, NULL) {}
527 536
528 #endif 537 #endif
OLDNEW
« gm/patch.cpp ('K') | « src/utils/SkDeferredCanvas.cpp ('k') | src/utils/SkNWayCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698