| OLD | NEW |
| 1 #ifndef DMPDFTask_DEFINED | 1 #ifndef DMPDFTask_DEFINED |
| 2 #define DMPDFTask_DEFINED | 2 #define DMPDFTask_DEFINED |
| 3 | 3 |
| 4 #include "DMExpectations.h" |
| 4 #include "DMPDFRasterizeTask.h" | 5 #include "DMPDFRasterizeTask.h" |
| 5 #include "DMExpectations.h" | |
| 6 #include "DMTask.h" | 6 #include "DMTask.h" |
| 7 #include "SkBitmap.h" | 7 #include "SkBitmap.h" |
| 8 #include "SkPicture.h" |
| 8 #include "SkString.h" | 9 #include "SkString.h" |
| 9 #include "SkTemplates.h" | 10 #include "SkTemplates.h" |
| 10 #include "gm.h" | 11 #include "gm.h" |
| 11 | 12 |
| 12 namespace DM { | 13 namespace DM { |
| 13 | 14 |
| 14 // This task renders a GM using Skia's PDF backend. | 15 // This task renders a GM or SKP using Skia's PDF backend. |
| 15 // If rasterizePdfProc is non-NULL, it will spawn a PDFRasterizeTask. | 16 // If rasterizePdfProc is non-NULL, it will spawn a PDFRasterizeTask. |
| 16 class PDFTask : public CpuTask { | 17 class PDFTask : public CpuTask { |
| 17 public: | 18 public: |
| 18 PDFTask(const char* suffix, | 19 PDFTask(const char*, |
| 19 Reporter*, | 20 Reporter*, |
| 20 TaskRunner*, | 21 TaskRunner*, |
| 21 const Expectations&, | |
| 22 skiagm::GMRegistry::Factory, | 22 skiagm::GMRegistry::Factory, |
| 23 RasterizePdfProc); | 23 RasterizePdfProc); |
| 24 | 24 |
| 25 PDFTask(Reporter*, |
| 26 TaskRunner*, |
| 27 SkPicture*, |
| 28 SkString name, |
| 29 RasterizePdfProc); |
| 30 |
| 25 virtual void draw() SK_OVERRIDE; | 31 virtual void draw() SK_OVERRIDE; |
| 26 | 32 |
| 27 virtual bool shouldSkip() const SK_OVERRIDE; | 33 virtual bool shouldSkip() const SK_OVERRIDE; |
| 28 | 34 |
| 29 virtual SkString name() const SK_OVERRIDE { return fName; } | 35 virtual SkString name() const SK_OVERRIDE { return fName; } |
| 30 | 36 |
| 31 private: | 37 private: |
| 38 // One of these two will be set. |
| 32 SkAutoTDelete<skiagm::GM> fGM; | 39 SkAutoTDelete<skiagm::GM> fGM; |
| 40 SkAutoTUnref<SkPicture> fPicture; |
| 41 |
| 33 const SkString fName; | 42 const SkString fName; |
| 34 const Expectations& fExpectations; | |
| 35 RasterizePdfProc fRasterize; | 43 RasterizePdfProc fRasterize; |
| 36 }; | 44 }; |
| 37 | 45 |
| 38 } // namespace DM | 46 } // namespace DM |
| 39 | 47 |
| 40 #endif // DMPDFTask_DEFINED | 48 #endif // DMPDFTask_DEFINED |
| OLD | NEW |