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

Unified Diff: dm/DM.cpp

Issue 1125793002: Add matrix configs to DM (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 8 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 | tools/dm_flags.py » ('j') | tools/dm_flags.py » ('J')
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 006e208993bebc64f140382bb10389545ab20efe..5d4718775847340684547d1de12493016c6f94e0 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -381,6 +381,21 @@ static Sink* create_via(const char* tag, Sink* wrapped) {
m.setScaleY((SkScalar)atof(FLAGS_matrix[3]));
VIA("matrix", ViaMatrix, m, wrapped);
VIA("upright", ViaUpright, m, wrapped);
+ } else if (FLAGS_matrix.count() == 9) {
+ SkMatrix m;
+ m.reset();
+ m.setAll((SkScalar)atof(FLAGS_matrix[0]),
+ (SkScalar)atof(FLAGS_matrix[1]),
+ (SkScalar)atof(FLAGS_matrix[2]),
+ (SkScalar)atof(FLAGS_matrix[3]),
+ (SkScalar)atof(FLAGS_matrix[4]),
+ (SkScalar)atof(FLAGS_matrix[5]),
+ (SkScalar)atof(FLAGS_matrix[6]),
+ (SkScalar)atof(FLAGS_matrix[7]),
+ (SkScalar)atof(FLAGS_matrix[8]));
+
+ VIA("matrix", ViaMatrix, m, wrapped);
+ VIA("upright", ViaUpright, m, wrapped);
mtklein 2015/05/05 15:51:44 I suspect ViaUpright won't really be a useful thin
}
#ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
« no previous file with comments | « no previous file | tools/dm_flags.py » ('j') | tools/dm_flags.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698