2 * Copyright 2014 Google Inc.
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
8 #ifndef DMPDFRasterizeTask_DEFINED
9 #define DMPDFRasterizeTask_DEFINED
16 #include "SkTemplates.h"
20 typedef bool (*RasterizePdfProc)(SkStream* pdf, SkBitmap* output);
22 class PDFRasterizeTask : public CpuTask {
24 // takes ownership of SkStreamAsset.
25 PDFRasterizeTask(const Task& parent,
29 virtual void draw() SK_OVERRIDE;
30 virtual bool shouldSkip() const SK_OVERRIDE { return NULL == fRasterize; }
31 virtual SkString name() const SK_OVERRIDE { return fName; }
35 SkAutoTDelete<SkStreamAsset> fPdf;
36 RasterizePdfProc fRasterize;
41 #endif // DMPDFRasterizeTask_DEFINED