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

Unified Diff: dm/DMWriteTask.h

Issue 502193002: SkData to SkStreamAsset to avoid unneeded copying (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Another Patch Set Created 6 years, 4 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/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 c2c1d9fd4773641b926dfdce1bf304a7e2c1d652..15e1300af2d2106921e0d0c10eab32e5891a8577 100644
--- a/dm/DMWriteTask.h
+++ b/dm/DMWriteTask.h
@@ -18,8 +18,9 @@ public:
WriteTask(const Task& parent, // WriteTask must be a child task.
SkBitmap bitmap); // Bitmap to encode to PNG and write to disk.
+ // Takes ownership of SkStreamAsset
WriteTask(const Task& parent, // WriteTask must be a child task.
- SkData *data, // Pre-encoded data to write to disk.
+ SkStreamAsset* data, // Pre-encoded data to write to disk.
const char* ext); // File extension.
virtual void draw() SK_OVERRIDE;
@@ -40,7 +41,7 @@ private:
SkTArray<SkString> fSuffixes;
const SkString fGmName;
const SkBitmap fBitmap;
- SkAutoTUnref<SkData> fData;
+ SkAutoTDelete<SkStreamAsset> fData;
const char* fExtension;
void makeDirOrFail(SkString dir);
« no previous file with comments | « dm/DMPDFTask.cpp ('k') | dm/DMWriteTask.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698