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

Side by Side Diff: dm/DM.cpp

Issue 1062043004: Add a Via to DM that records into two pictures and draws using the second. (Closed) Base URL: https://skia.googlesource.com/skia@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 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 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "CrashHandler.h" 8 #include "CrashHandler.h"
9 #include "DMJsonWriter.h" 9 #include "DMJsonWriter.h"
10 #include "DMSrcSink.h" 10 #include "DMSrcSink.h"
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 SINK("xps", XPSSink); 313 SINK("xps", XPSSink);
314 } 314 }
315 #undef SINK 315 #undef SINK
316 return NULL; 316 return NULL;
317 } 317 }
318 318
319 static Sink* create_via(const char* tag, Sink* wrapped) { 319 static Sink* create_via(const char* tag, Sink* wrapped) {
320 #define VIA(t, via, ...) if (0 == strcmp(t, tag)) { return new via(__VA_ARGS__); } 320 #define VIA(t, via, ...) if (0 == strcmp(t, tag)) { return new via(__VA_ARGS__); }
321 VIA("pipe", ViaPipe, wrapped); 321 VIA("pipe", ViaPipe, wrapped);
322 VIA("serialize", ViaSerialization, wrapped); 322 VIA("serialize", ViaSerialization, wrapped);
323 VIA("2ndpic", ViaSecondPicture, wrapped);
323 VIA("tiles", ViaTiles, 256, 256, NULL, wrapped); 324 VIA("tiles", ViaTiles, 256, 256, NULL, wrapped);
324 VIA("tiles_rt", ViaTiles, 256, 256, new SkRTreeFactory, wrapped); 325 VIA("tiles_rt", ViaTiles, 256, 256, new SkRTreeFactory, wrapped);
325 326
326 if (FLAGS_matrix.count() == 4) { 327 if (FLAGS_matrix.count() == 4) {
327 SkMatrix m; 328 SkMatrix m;
328 m.reset(); 329 m.reset();
329 m.setScaleX((SkScalar)atof(FLAGS_matrix[0])); 330 m.setScaleX((SkScalar)atof(FLAGS_matrix[0]));
330 m.setSkewX ((SkScalar)atof(FLAGS_matrix[1])); 331 m.setSkewX ((SkScalar)atof(FLAGS_matrix[1]));
331 m.setSkewY ((SkScalar)atof(FLAGS_matrix[2])); 332 m.setSkewY ((SkScalar)atof(FLAGS_matrix[2]));
332 m.setScaleY((SkScalar)atof(FLAGS_matrix[3])); 333 m.setScaleY((SkScalar)atof(FLAGS_matrix[3]));
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 } 699 }
699 return 0; 700 return 0;
700 } 701 }
701 702
702 #if !defined(SK_BUILD_FOR_IOS) 703 #if !defined(SK_BUILD_FOR_IOS)
703 int main(int argc, char** argv) { 704 int main(int argc, char** argv) {
704 SkCommandLineFlags::Parse(argc, argv); 705 SkCommandLineFlags::Parse(argc, argv);
705 return dm_main(); 706 return dm_main();
706 } 707 }
707 #endif 708 #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