| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 "DMPDFTask.h" | 8 #include "DMPDFTask.h" |
| 9 #include "DMExpectationsTask.h" | 9 #include "DMExpectationsTask.h" |
| 10 #include "DMPDFRasterizeTask.h" | 10 #include "DMPDFRasterizeTask.h" |
| 11 #include "DMUtil.h" | 11 #include "DMUtil.h" |
| 12 #include "DMWriteTask.h" | 12 #include "DMWriteTask.h" |
| 13 #include "SkCommandLineFlags.h" | 13 #include "SkCommandLineFlags.h" |
| 14 #include "SkDocument.h" | 14 #include "SkDocument.h" |
| 15 | 15 |
| 16 DEFINE_bool(pdf, true, "PDF backend master switch."); | 16 // The PDF backend is not threadsafe. If you run dm with --pdf repeatedly, you |
| 17 // will quickly find yourself crashed. (while catchsegv out/Release/dm;; end). |
| 18 // |
| 19 // TODO(mtklein): re-enable by default, maybe moving to its own single thread. |
| 20 DEFINE_bool(pdf, false, "PDF backend master switch."); |
| 17 | 21 |
| 18 namespace DM { | 22 namespace DM { |
| 19 | 23 |
| 20 PDFTask::PDFTask(const char* suffix, | 24 PDFTask::PDFTask(const char* suffix, |
| 21 Reporter* reporter, | 25 Reporter* reporter, |
| 22 TaskRunner* taskRunner, | 26 TaskRunner* taskRunner, |
| 23 const Expectations& expectations, | 27 const Expectations& expectations, |
| 24 skiagm::GMRegistry::Factory factory, | 28 skiagm::GMRegistry::Factory factory, |
| 25 RasterizePdfProc rasterizePdfProc) | 29 RasterizePdfProc rasterizePdfProc) |
| 26 : CpuTask(reporter, taskRunner) | 30 : CpuTask(reporter, taskRunner) |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 if (!FLAGS_pdf) { | 78 if (!FLAGS_pdf) { |
| 75 return true; | 79 return true; |
| 76 } | 80 } |
| 77 if (fGM->getFlags() & skiagm::GM::kSkipPDF_Flag) { | 81 if (fGM->getFlags() & skiagm::GM::kSkipPDF_Flag) { |
| 78 return true; | 82 return true; |
| 79 } | 83 } |
| 80 return false; | 84 return false; |
| 81 } | 85 } |
| 82 | 86 |
| 83 } // namespace DM | 87 } // namespace DM |
| OLD | NEW |