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

Unified Diff: dm/DMPDFRasterizeTask.h

Issue 312873002: DM: add pdf (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: put cutils back 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dm/DM.cpp ('k') | dm/DMPDFRasterizeTask.cpp » ('j') | dm/DMPDFTask.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DMPDFRasterizeTask.h
diff --git a/dm/DMPDFRasterizeTask.h b/dm/DMPDFRasterizeTask.h
new file mode 100644
index 0000000000000000000000000000000000000000..2e24b894e7a05642bbcdfc4f188492da87341262
--- /dev/null
+++ b/dm/DMPDFRasterizeTask.h
@@ -0,0 +1,43 @@
+/*
+ * 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
+
+#include "DMExpectations.h"
+#include "DMTask.h"
+#include "SkBitmap.h"
+#include "SkData.h"
+#include "SkStream.h"
+#include "SkString.h"
+#include "SkTemplates.h"
+
+namespace DM {
+
+typedef bool (*RasterizePdfProc)(SkStream* pdf, SkBitmap* output);
+
+class PDFRasterizeTask : public CpuTask {
+public:
+ PDFRasterizeTask(const Task& parent,
+ SkData* pdf,
+ const Expectations&,
+ RasterizePdfProc);
+
+ virtual void draw() SK_OVERRIDE;
+ virtual bool shouldSkip() const SK_OVERRIDE { return NULL == fRasterize; }
+ virtual SkString name() const SK_OVERRIDE { return fName; }
+
+private:
+ const SkString fName;
+ SkAutoTUnref<SkData> fPdf;
+ const Expectations& fExpectations;
+ RasterizePdfProc fRasterize;
+};
+
+} // namespace DM
+
+#endif // DMPDFRasterizeTask_DEFINED
« no previous file with comments | « dm/DM.cpp ('k') | dm/DMPDFRasterizeTask.cpp » ('j') | dm/DMPDFTask.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698