Update gm flags so that it can be run without a pdf rasterizer.
BUG=1806 R=edisonn@google.com Review URL: https://codereview.chromium.org/61643004 git-svn-id: http://skia.googlecode.com/svn/trunk@12157 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
23ed4b307f
commit
f8afb2bd58
@ -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;
|
||||
}
|
||||
|
||||
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.
|
||||
|
Loading…
Reference in New Issue
Block a user