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

Unified Diff: src/core/SkPath.cpp

Issue 676803002: add float equivalent in dumpHex output as comment (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: adjust path test to match additional output Created 6 years, 2 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
« no previous file with comments | « no previous file | tests/PathTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPath.cpp
diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp
index 06f8b7e259f44bbd33f2a06b9dc3ea1253572ee1..f756ce365c4d0c7dd7a1a3eba74ed9de13d0e1f5 100644
--- a/src/core/SkPath.cpp
+++ b/src/core/SkPath.cpp
@@ -2050,7 +2050,21 @@ static void append_params(SkString* str, const char label[], const SkPoint pts[]
str->append(", ");
append_scalar(str, conicWeight, dumpAsHex);
}
- str->append(");\n");
+ str->append(");");
+ if (dumpAsHex) {
+ str->append(" // ");
+ for (int i = 0; i < count; ++i) {
+ append_scalar(str, values[i], false);
+ if (i < count - 1) {
+ str->append(", ");
+ }
+ }
+ if (conicWeight >= 0) {
+ str->append(", ");
+ append_scalar(str, conicWeight, false);
+ }
+ }
+ str->append("\n");
}
void SkPath::dump(SkWStream* wStream, bool forceClose, bool dumpAsHex) const {
« no previous file with comments | « no previous file | tests/PathTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698