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

Unified 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: Dumped corners and colors and used enum for 12's and 4's 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 side-by-side diff with in-line comments
Download patch
Index: src/utils/SkDumpCanvas.cpp
diff --git a/src/utils/SkDumpCanvas.cpp b/src/utils/SkDumpCanvas.cpp
index b12928fbbb9e911c6d33d21e7d6b092bf2d4274e..c94b90d43b51614aca95642374f95723b17ffbeb 100644
--- a/src/utils/SkDumpCanvas.cpp
+++ b/src/utils/SkDumpCanvas.cpp
@@ -442,6 +442,19 @@ void SkDumpCanvas::drawVertices(VertexMode vmode, int vertexCount,
SkScalarToFloat(vertices[0].fY));
}
+void SkDumpCanvas::drawPatch(const SkPatch& patch, const SkPaint& paint) {
+ const SkPoint* points = patch.getControlPoints();
+ const SkColor* color = patch.getColors();
+ //dumps corner points and colors.
+ this->dump(kDrawPatch_Verb, &paint, "drawPatch(Vertices{[%f, %f], [%f, %f], [%f, %f], [%f, %f]}\
+ | Colors{[0x%x], [0x%x], [0x%x], [0x%x]})",
+ points[SkPatch::kTopP0_CubicCtrlPts].fX, points[SkPatch::kTopP0_CubicCtrlPts].fY,
+ points[SkPatch::kTopP3_CubicCtrlPts].fX, points[SkPatch::kTopP3_CubicCtrlPts].fY,
robertphillips 2014/08/05 12:44:45 Are these indices correct ?
dandov 2014/08/05 14:27:11 On of them was not correct and switched them to ke
+ points[SkPatch::kBottomP0_CubicCtrlPts].fX,points[SkPatch::kBottomP3_CubicCtrlPts].fY,
+ points[SkPatch::kBottomP3_CubicCtrlPts].fX,points[SkPatch::kBottomP3_CubicCtrlPts].fY,
+ color[0], color[1], color[2], color[3]);
+}
+
void SkDumpCanvas::drawData(const void* data, size_t length) {
// this->dump(kDrawData_Verb, NULL, "drawData(%d)", length);
this->dump(kDrawData_Verb, NULL, "drawData(%d) %.*s", length,

Powered by Google App Engine
This is Rietveld 408576698