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

Unified Diff: dm/DMWriteTask.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
« dm/DMPDFTask.cpp ('K') | « dm/DMPDFTask.cpp ('k') | dm/DMWriteTask.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DMWriteTask.h
diff --git a/dm/DMWriteTask.h b/dm/DMWriteTask.h
index a90f66aec59a19ad578e1549f62ac3a03fcb2c9e..c2c1d9fd4773641b926dfdce1bf304a7e2c1d652 100644
--- a/dm/DMWriteTask.h
+++ b/dm/DMWriteTask.h
@@ -15,8 +15,12 @@ namespace DM {
class WriteTask : public CpuTask {
public:
- WriteTask(const Task& parent, // WriteTask must be a child Task. Pass its parent here.
- SkBitmap bitmap); // Bitmap to write.
+ WriteTask(const Task& parent, // WriteTask must be a child task.
+ SkBitmap bitmap); // Bitmap to encode to PNG and write to disk.
+
+ WriteTask(const Task& parent, // WriteTask must be a child task.
+ SkData *data, // Pre-encoded data to write to disk.
+ const char* ext); // File extension.
virtual void draw() SK_OVERRIDE;
virtual bool shouldSkip() const SK_OVERRIDE;
@@ -34,8 +38,10 @@ public:
private:
SkTArray<SkString> fSuffixes;
- SkString fGmName;
+ const SkString fGmName;
const SkBitmap fBitmap;
+ SkAutoTUnref<SkData> fData;
+ const char* fExtension;
void makeDirOrFail(SkString dir);
};
« dm/DMPDFTask.cpp ('K') | « dm/DMPDFTask.cpp ('k') | dm/DMWriteTask.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698