| * Copyright 2014 Google Inc. |
| * Use of this source code is governed by a BSD-style license that can be |
| * found in the LICENSE file. |
| #ifndef DMPDFRasterizeTask_DEFINED |
| #define DMPDFRasterizeTask_DEFINED |
| typedef bool (*RasterizePdfProc)(SkStream* pdf, SkBitmap* output); |
| class PDFRasterizeTask : public CpuTask { |
| // takes ownership of SkStreamAsset. |
| PDFRasterizeTask(const Task& parent, |
| virtual void draw() SK_OVERRIDE; |
| virtual bool shouldSkip() const SK_OVERRIDE { return NULL == fRasterize; } |
| virtual SkString name() const SK_OVERRIDE { return fName; } |
| SkAutoTDelete<SkStreamAsset> fPdf; |
| RasterizePdfProc fRasterize; |
| #endif // DMPDFRasterizeTask_DEFINED |