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

Side by Side Diff: gm/gmmain.cpp

Issue 270263009: Allow for no pdf rasterizers in gm. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 2011 Google Inc. 2 * Copyright 2011 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 /* 8 /*
9 * Code for the "gm" (Golden Master) rendering comparison tool. 9 * Code for the "gm" (Golden Master) rendering comparison tool.
10 * 10 *
(...skipping 1302 matching lines...) Expand 10 before | Expand all | Expand 10 after
1313 #endif // SK_SUPPORT_GPU 1313 #endif // SK_SUPPORT_GPU
1314 #ifdef SK_SUPPORT_XPS 1314 #ifdef SK_SUPPORT_XPS
1315 /* At present we have no way of comparing XPS files (either natively or by c onverting to PNG). */ 1315 /* At present we have no way of comparing XPS files (either natively or by c onverting to PNG). */
1316 { SkBitmap::kARGB_8888_Config, kXPS_Backend, kDontCare_GLContextType, 0, kWrite_ConfigFlag, "xps", true }, 1316 { SkBitmap::kARGB_8888_Config, kXPS_Backend, kDontCare_GLContextType, 0, kWrite_ConfigFlag, "xps", true },
1317 #endif // SK_SUPPORT_XPS 1317 #endif // SK_SUPPORT_XPS
1318 #ifdef SK_SUPPORT_PDF 1318 #ifdef SK_SUPPORT_PDF
1319 { SkBitmap::kARGB_8888_Config, kPDF_Backend, kDontCare_GLContextType, 0, kRW_ConfigFlag, "pdf", true }, 1319 { SkBitmap::kARGB_8888_Config, kPDF_Backend, kDontCare_GLContextType, 0, kRW_ConfigFlag, "pdf", true },
1320 #endif // SK_SUPPORT_PDF 1320 #endif // SK_SUPPORT_PDF
1321 }; 1321 };
1322 1322
1323 static bool SkNoRasterizePDF(SkStream*, SkBitmap*) { return false; }
1324
1323 static const PDFRasterizerData kPDFRasterizers[] = { 1325 static const PDFRasterizerData kPDFRasterizers[] = {
1324 #ifdef SK_BUILD_FOR_MAC 1326 #ifdef SK_BUILD_FOR_MAC
1325 { &SkPDFDocumentToBitmap, "mac", true }, 1327 { &SkPDFDocumentToBitmap, "mac", true },
1326 #endif 1328 #endif
1327 #ifdef SK_BUILD_POPPLER 1329 #ifdef SK_BUILD_POPPLER
1328 { &SkPopplerRasterizePDF, "poppler", true }, 1330 { &SkPopplerRasterizePDF, "poppler", true },
1329 #endif 1331 #endif
1330 #ifdef SK_BUILD_NATIVE_PDF_RENDERER 1332 #ifdef SK_BUILD_NATIVE_PDF_RENDERER
1331 { &SkNativeRasterizePDF, "native", true }, 1333 { &SkNativeRasterizePDF, "native", true },
1332 #endif // SK_BUILD_NATIVE_PDF_RENDERER 1334 #endif // SK_BUILD_NATIVE_PDF_RENDERER
1335 // The following exists so that this array is never zero length.
1336 { &SkNoRasterizePDF, "none", false},
1333 }; 1337 };
1334 1338
1335 static const char kDefaultsConfigStr[] = "defaults"; 1339 static const char kDefaultsConfigStr[] = "defaults";
1336 static const char kExcludeConfigChar = '~'; 1340 static const char kExcludeConfigChar = '~';
1337 1341
1338 static SkString configUsage() { 1342 static SkString configUsage() {
1339 SkString result; 1343 SkString result;
1340 result.appendf("Space delimited list of which configs to run. Possible optio ns: ["); 1344 result.appendf("Space delimited list of which configs to run. Possible optio ns: [");
1341 for (size_t i = 0; i < SK_ARRAY_COUNT(gRec); ++i) { 1345 for (size_t i = 0; i < SK_ARRAY_COUNT(gRec); ++i) {
1342 SkASSERT(gRec[i].fName != kDefaultsConfigStr); 1346 SkASSERT(gRec[i].fName != kDefaultsConfigStr);
(...skipping 1112 matching lines...) Expand 10 before | Expand all | Expand 10 after
2455 if (FLAGS_forceBWtext) { 2459 if (FLAGS_forceBWtext) {
2456 canvas->setDrawFilter(SkNEW(BWTextDrawFilter))->unref(); 2460 canvas->setDrawFilter(SkNEW(BWTextDrawFilter))->unref();
2457 } 2461 }
2458 } 2462 }
2459 2463
2460 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) 2464 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL)
2461 int main(int argc, char * const argv[]) { 2465 int main(int argc, char * const argv[]) {
2462 return tool_main(argc, (char**) argv); 2466 return tool_main(argc, (char**) argv);
2463 } 2467 }
2464 #endif 2468 #endif
OLDNEW
« 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