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

Side by Side Diff: dm/DMPDFRasterizeTask.h

Issue 316643003: DM: SKP source / PDF backend (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: cast Created 6 years, 6 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 unified diff | Download patch
« no previous file with comments | « dm/DMGpuGMTask.cpp ('k') | dm/DMPDFRasterizeTask.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef DMPDFRasterizeTask_DEFINED 8 #ifndef DMPDFRasterizeTask_DEFINED
9 #define DMPDFRasterizeTask_DEFINED 9 #define DMPDFRasterizeTask_DEFINED
10 10
11 #include "DMExpectations.h"
12 #include "DMTask.h" 11 #include "DMTask.h"
13 #include "SkBitmap.h" 12 #include "SkBitmap.h"
14 #include "SkData.h" 13 #include "SkData.h"
15 #include "SkStream.h" 14 #include "SkStream.h"
16 #include "SkString.h" 15 #include "SkString.h"
17 #include "SkTemplates.h" 16 #include "SkTemplates.h"
18 17
19 namespace DM { 18 namespace DM {
20 19
21 typedef bool (*RasterizePdfProc)(SkStream* pdf, SkBitmap* output); 20 typedef bool (*RasterizePdfProc)(SkStream* pdf, SkBitmap* output);
22 21
23 class PDFRasterizeTask : public CpuTask { 22 class PDFRasterizeTask : public CpuTask {
24 public: 23 public:
25 PDFRasterizeTask(const Task& parent, 24 PDFRasterizeTask(const Task& parent,
26 SkData* pdf, 25 SkData* pdf,
27 const Expectations&,
28 RasterizePdfProc); 26 RasterizePdfProc);
29 27
30 virtual void draw() SK_OVERRIDE; 28 virtual void draw() SK_OVERRIDE;
31 virtual bool shouldSkip() const SK_OVERRIDE { return NULL == fRasterize; } 29 virtual bool shouldSkip() const SK_OVERRIDE { return NULL == fRasterize; }
32 virtual SkString name() const SK_OVERRIDE { return fName; } 30 virtual SkString name() const SK_OVERRIDE { return fName; }
33 31
34 private: 32 private:
35 const SkString fName; 33 const SkString fName;
36 SkAutoTUnref<SkData> fPdf; 34 SkAutoTUnref<SkData> fPdf;
37 const Expectations& fExpectations;
38 RasterizePdfProc fRasterize; 35 RasterizePdfProc fRasterize;
39 }; 36 };
40 37
41 } // namespace DM 38 } // namespace DM
42 39
43 #endif // DMPDFRasterizeTask_DEFINED 40 #endif // DMPDFRasterizeTask_DEFINED
OLDNEW
« no previous file with comments | « dm/DMGpuGMTask.cpp ('k') | dm/DMPDFRasterizeTask.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698