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

Unified Diff: dm/DM.cpp

Issue 931483002: Suggested version with 'undo'. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: cast to scalar Created 5 years, 10 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 | dm/DMSrcSink.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DM.cpp
diff --git a/dm/DM.cpp b/dm/DM.cpp
index 5745113096b4433e473ada6793e56380c58537cf..b41a77f8ade05aa36a1220d455056f7cbc6759ca 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -21,8 +21,9 @@ DEFINE_bool(nameByHash, false,
"If true, write to FLAGS_writePath[0]/<hash>.png instead of "
"to FLAGS_writePath[0]/<config>/<sourceType>/<name>.png");
DEFINE_bool2(pathOpsExtended, x, false, "Run extended pathOps tests.");
-DEFINE_string(matrix, "1 0 0 0 1 0 0 0 1",
- "Matrix to apply when using 'matrix' in config.");
+DEFINE_string(matrix, "1 0 0 1",
+ "2x2 scale+skew matrix to apply or upright when using "
+ "'matrix' or 'upright' in config.");
DEFINE_bool(gpu_threading, false, "Allow GPU work to run on multiple threads?");
DEFINE_string(blacklist, "",
@@ -242,12 +243,15 @@ static Sink* create_via(const char* tag, Sink* wrapped) {
VIA("tiles", ViaTiles, 256, 256, NULL, wrapped);
VIA("tiles_rt", ViaTiles, 256, 256, new SkRTreeFactory, wrapped);
- if (FLAGS_matrix.count() == 9) {
+ if (FLAGS_matrix.count() == 4) {
SkMatrix m;
- for (int i = 0; i < 9; i++) {
- m[i] = (SkScalar)atof(FLAGS_matrix[i]);
- }
- VIA("matrix", ViaMatrix, m, wrapped);
+ m.reset();
+ m.setScaleX((SkScalar)atof(FLAGS_matrix[0]));
+ m.setSkewX ((SkScalar)atof(FLAGS_matrix[1]));
+ m.setSkewY ((SkScalar)atof(FLAGS_matrix[2]));
+ m.setScaleY((SkScalar)atof(FLAGS_matrix[3]));
+ VIA("matrix", ViaMatrix, m, wrapped);
+ VIA("upright", ViaUpright, m, wrapped);
}
#undef VIA
return NULL;
« no previous file with comments | « no previous file | dm/DMSrcSink.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698