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); |
}; |