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

Side by Side Diff: dm/DM.cpp

Issue 1063873004: DM: add --multiPage option (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 unified diff | Download patch
« no previous file with comments | « no previous file | dm/DMSrcSink.h » ('j') | dm/DMSrcSink.cpp » ('J')
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 28 matching lines...) Expand all
39 "Space-separated config/src/srcOptions/name quadruples to blacklist. '_ ' matches anything. E.g. \n" 39 "Space-separated config/src/srcOptions/name quadruples to blacklist. '_ ' matches anything. E.g. \n"
40 "'--blacklist gpu skp _ _' will blacklist all SKPs drawn into the gpu co nfig.\n" 40 "'--blacklist gpu skp _ _' will blacklist all SKPs drawn into the gpu co nfig.\n"
41 "'--blacklist gpu skp _ _ 8888 gm _ aarects' will also blacklist the aar ects GM on 8888."); 41 "'--blacklist gpu skp _ _ 8888 gm _ aarects' will also blacklist the aar ects GM on 8888.");
42 42
43 DEFINE_string2(readPath, r, "", "If set check for equality with golden results i n this directory."); 43 DEFINE_string2(readPath, r, "", "If set check for equality with golden results i n this directory.");
44 44
45 DEFINE_string(uninterestingHashesFile, "", 45 DEFINE_string(uninterestingHashesFile, "",
46 "File containing a list of uninteresting hashes. If a result hashes to s omething in " 46 "File containing a list of uninteresting hashes. If a result hashes to s omething in "
47 "this list, no image is written for that result."); 47 "this list, no image is written for that result.");
48 48
49 DEFINE_bool(multiPage, false, "For document-type backends, render the source"
50 " into multiple pages");
51
49 __SK_FORCE_IMAGE_DECODER_LINKING; 52 __SK_FORCE_IMAGE_DECODER_LINKING;
50 using namespace DM; 53 using namespace DM;
51 54
52 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~*/ 55 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~*/
53 56
54 SK_DECLARE_STATIC_MUTEX(gFailuresMutex); 57 SK_DECLARE_STATIC_MUTEX(gFailuresMutex);
55 static SkTArray<SkString> gFailures; 58 static SkTArray<SkString> gFailures;
56 59
57 static void fail(ImplicitString err) { 60 static void fail(ImplicitString err) {
58 SkAutoMutexAcquire lock(gFailuresMutex); 61 SkAutoMutexAcquire lock(gFailuresMutex);
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 #endif 341 #endif
339 } 342 }
340 343
341 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK 344 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
342 SINK("hwui", HWUISink); 345 SINK("hwui", HWUISink);
343 #endif 346 #endif
344 347
345 if (FLAGS_cpu) { 348 if (FLAGS_cpu) {
346 SINK("565", RasterSink, kRGB_565_SkColorType); 349 SINK("565", RasterSink, kRGB_565_SkColorType);
347 SINK("8888", RasterSink, kN32_SkColorType); 350 SINK("8888", RasterSink, kN32_SkColorType);
348 SINK("pdf", PDFSink); 351 SINK("pdf", PDFSink, FLAGS_multiPage);
349 SINK("skp", SKPSink); 352 SINK("skp", SKPSink);
350 SINK("svg", SVGSink); 353 SINK("svg", SVGSink);
351 SINK("null", NullSink); 354 SINK("null", NullSink);
352 SINK("xps", XPSSink); 355 SINK("xps", XPSSink, FLAGS_multiPage);
353 } 356 }
354 #undef SINK 357 #undef SINK
355 return NULL; 358 return NULL;
356 } 359 }
357 360
358 static Sink* create_via(const char* tag, Sink* wrapped) { 361 static Sink* create_via(const char* tag, Sink* wrapped) {
359 #define VIA(t, via, ...) if (0 == strcmp(t, tag)) { return new via(__VA_ARGS__); } 362 #define VIA(t, via, ...) if (0 == strcmp(t, tag)) { return new via(__VA_ARGS__); }
360 VIA("pipe", ViaPipe, wrapped); 363 VIA("pipe", ViaPipe, wrapped);
361 VIA("serialize", ViaSerialization, wrapped); 364 VIA("serialize", ViaSerialization, wrapped);
362 VIA("2ndpic", ViaSecondPicture, wrapped); 365 VIA("2ndpic", ViaSecondPicture, wrapped);
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 } 747 }
745 return 0; 748 return 0;
746 } 749 }
747 750
748 #if !defined(SK_BUILD_FOR_IOS) 751 #if !defined(SK_BUILD_FOR_IOS)
749 int main(int argc, char** argv) { 752 int main(int argc, char** argv) {
750 SkCommandLineFlags::Parse(argc, argv); 753 SkCommandLineFlags::Parse(argc, argv);
751 return dm_main(); 754 return dm_main();
752 } 755 }
753 #endif 756 #endif
OLDNEW
« no previous file with comments | « no previous file | dm/DMSrcSink.h » ('j') | dm/DMSrcSink.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698