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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | dm/DMSrcSink.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include "CrashHandler.h" 1 #include "CrashHandler.h"
2 #include "DMJsonWriter.h" 2 #include "DMJsonWriter.h"
3 #include "DMSrcSink.h" 3 #include "DMSrcSink.h"
4 #include "OverwriteLine.h" 4 #include "OverwriteLine.h"
5 #include "ProcStats.h" 5 #include "ProcStats.h"
6 #include "SkBBHFactory.h" 6 #include "SkBBHFactory.h"
7 #include "SkChecksum.h" 7 #include "SkChecksum.h"
8 #include "SkCommonFlags.h" 8 #include "SkCommonFlags.h"
9 #include "SkForceLinking.h" 9 #include "SkForceLinking.h"
10 #include "SkGraphics.h" 10 #include "SkGraphics.h"
11 #include "SkInstCnt.h" 11 #include "SkInstCnt.h"
12 #include "SkMD5.h" 12 #include "SkMD5.h"
13 #include "SkOSFile.h" 13 #include "SkOSFile.h"
14 #include "SkTDynamicHash.h" 14 #include "SkTDynamicHash.h"
15 #include "SkTaskGroup.h" 15 #include "SkTaskGroup.h"
16 #include "Test.h" 16 #include "Test.h"
17 #include "Timer.h" 17 #include "Timer.h"
18 18
19 DEFINE_string(src, "tests gm skp image subset", "Source types to test."); 19 DEFINE_string(src, "tests gm skp image subset", "Source types to test.");
20 DEFINE_bool(nameByHash, false, 20 DEFINE_bool(nameByHash, false,
21 "If true, write to FLAGS_writePath[0]/<hash>.png instead of " 21 "If true, write to FLAGS_writePath[0]/<hash>.png instead of "
22 "to FLAGS_writePath[0]/<config>/<sourceType>/<name>.png"); 22 "to FLAGS_writePath[0]/<config>/<sourceType>/<name>.png");
23 DEFINE_bool2(pathOpsExtended, x, false, "Run extended pathOps tests."); 23 DEFINE_bool2(pathOpsExtended, x, false, "Run extended pathOps tests.");
24 DEFINE_string(matrix, "1 0 0 0 1 0 0 0 1", 24 DEFINE_string(matrix, "1 0 0 1",
25 "Matrix to apply when using 'matrix' in config."); 25 "2x2 scale+skew matrix to apply or upright when using "
26 "'matrix' or 'upright' in config.");
26 DEFINE_bool(gpu_threading, false, "Allow GPU work to run on multiple threads?"); 27 DEFINE_bool(gpu_threading, false, "Allow GPU work to run on multiple threads?");
27 28
28 DEFINE_string(blacklist, "", 29 DEFINE_string(blacklist, "",
29 "Space-separated config/src/name triples to blacklist. '_' matches anyt hing. E.g. \n" 30 "Space-separated config/src/name triples to blacklist. '_' matches anyt hing. E.g. \n"
30 "'--blacklist gpu skp _' will blacklist all SKPs drawn into the gpu conf ig.\n" 31 "'--blacklist gpu skp _' will blacklist all SKPs drawn into the gpu conf ig.\n"
31 "'--blacklist gpu skp _ 8888 gm aarects' will also blacklist the aarects GM on 8888."); 32 "'--blacklist gpu skp _ 8888 gm aarects' will also blacklist the aarects GM on 8888.");
32 33
33 DEFINE_string2(readPath, r, "", "If set check for equality with golden results i n this directory."); 34 DEFINE_string2(readPath, r, "", "If set check for equality with golden results i n this directory.");
34 35
35 __SK_FORCE_IMAGE_DECODER_LINKING; 36 __SK_FORCE_IMAGE_DECODER_LINKING;
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 return NULL; 236 return NULL;
236 } 237 }
237 238
238 static Sink* create_via(const char* tag, Sink* wrapped) { 239 static Sink* create_via(const char* tag, Sink* wrapped) {
239 #define VIA(t, via, ...) if (0 == strcmp(t, tag)) { return new via(__VA_ARGS__); } 240 #define VIA(t, via, ...) if (0 == strcmp(t, tag)) { return new via(__VA_ARGS__); }
240 VIA("pipe", ViaPipe, wrapped); 241 VIA("pipe", ViaPipe, wrapped);
241 VIA("serialize", ViaSerialization, wrapped); 242 VIA("serialize", ViaSerialization, wrapped);
242 VIA("tiles", ViaTiles, 256, 256, NULL, wrapped); 243 VIA("tiles", ViaTiles, 256, 256, NULL, wrapped);
243 VIA("tiles_rt", ViaTiles, 256, 256, new SkRTreeFactory, wrapped); 244 VIA("tiles_rt", ViaTiles, 256, 256, new SkRTreeFactory, wrapped);
244 245
245 if (FLAGS_matrix.count() == 9) { 246 if (FLAGS_matrix.count() == 4) {
246 SkMatrix m; 247 SkMatrix m;
247 for (int i = 0; i < 9; i++) { 248 m.reset();
248 m[i] = (SkScalar)atof(FLAGS_matrix[i]); 249 m.setScaleX((SkScalar)atof(FLAGS_matrix[0]));
249 } 250 m.setSkewX ((SkScalar)atof(FLAGS_matrix[1]));
250 VIA("matrix", ViaMatrix, m, wrapped); 251 m.setSkewY ((SkScalar)atof(FLAGS_matrix[2]));
252 m.setScaleY((SkScalar)atof(FLAGS_matrix[3]));
253 VIA("matrix", ViaMatrix, m, wrapped);
254 VIA("upright", ViaUpright, m, wrapped);
251 } 255 }
252 #undef VIA 256 #undef VIA
253 return NULL; 257 return NULL;
254 } 258 }
255 259
256 static void gather_sinks() { 260 static void gather_sinks() {
257 for (int i = 0; i < FLAGS_config.count(); i++) { 261 for (int i = 0; i < FLAGS_config.count(); i++) {
258 const char* config = FLAGS_config[i]; 262 const char* config = FLAGS_config[i];
259 SkTArray<SkString> parts; 263 SkTArray<SkString> parts;
260 SkStrSplit(config, "-", &parts); 264 SkStrSplit(config, "-", &parts);
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 } 560 }
557 return 0; 561 return 0;
558 } 562 }
559 563
560 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) 564 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL)
561 int main(int argc, char** argv) { 565 int main(int argc, char** argv) {
562 SkCommandLineFlags::Parse(argc, argv); 566 SkCommandLineFlags::Parse(argc, argv);
563 return dm_main(); 567 return dm_main();
564 } 568 }
565 #endif 569 #endif
OLDNEW
« 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