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

Unified Diff: gm/gmmain.cpp

Issue 61643004: Update gm flags so that it can be run without a pdf rasterizer. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 1 month 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/gmmain.cpp
diff --git a/gm/gmmain.cpp b/gm/gmmain.cpp
index 92c70b584289046492e0267ade0cba004cc87043..2a7db03bab38cb494f109322aa72bb0d72d21c81 100644
--- a/gm/gmmain.cpp
+++ b/gm/gmmain.cpp
@@ -1408,7 +1408,7 @@ static SkString pdfRasterizerUsage() {
// Alphabetized ignoring "no" prefix ("readPath", "noreplay", "resourcePath").
DEFINE_string(config, "", configUsage().c_str());
-DEFINE_string(pdfRasterizers, "", pdfRasterizerUsage().c_str());
+DEFINE_string(pdfRasterizers, "default", pdfRasterizerUsage().c_str());
DEFINE_bool(deferred, false, "Exercise the deferred rendering test pass.");
DEFINE_string(excludeConfig, "", "Space delimited list of configs to skip.");
DEFINE_bool(forceBWtext, false, "Disable text anti-aliasing.");
@@ -2003,25 +2003,25 @@ static bool parse_flags_pdf_rasterizers(const SkTDArray<size_t>& configs,
return true;
}
robertphillips 2013/11/06 16:36:13 Won't this now not use a rasterizer by default?
vandebo (ex-Chrome) 2013/11/06 16:46:40 I changed the default value of the flag to "defaul
- for (int i = 0; i < FLAGS_pdfRasterizers.count(); i++) {
- const char* rasterizer = FLAGS_pdfRasterizers[i];
- const PDFRasterizerData* rasterizerPtr = findPDFRasterizer(rasterizer);
-
- if (rasterizerPtr == NULL) {
- gm_fprintf(stderr, "unrecognized rasterizer %s\n", rasterizer);
- return false;
- }
- appendUnique<const PDFRasterizerData*>(outRasterizers,
- rasterizerPtr);
- }
-
- if (outRasterizers->count() == 0) {
- // if no config is specified by user, add the defaults
+ if (FLAGS_pdfRasterizers.count() == 1 &&
+ !strcmp(FLAGS_pdfRasterizers[0], "default")) {
for (int i = 0; i < (int)SK_ARRAY_COUNT(kPDFRasterizers); ++i) {
if (kPDFRasterizers[i].fRunByDefault) {
*outRasterizers->append() = &kPDFRasterizers[i];
}
}
+ } else {
+ for (int i = 0; i < FLAGS_pdfRasterizers.count(); i++) {
+ const char* rasterizer = FLAGS_pdfRasterizers[i];
+ const PDFRasterizerData* rasterizerPtr =
+ findPDFRasterizer(rasterizer);
+ if (rasterizerPtr == NULL) {
+ gm_fprintf(stderr, "unrecognized rasterizer %s\n", rasterizer);
+ return false;
+ }
+ appendUnique<const PDFRasterizerData*>(outRasterizers,
+ rasterizerPtr);
+ }
}
// now show the user the set of configs that will be run.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698