diff options
author | 2015-01-15 10:56:12 -0800 | |
---|---|---|
committer | 2015-01-15 10:56:12 -0800 | |
commit | 748ca3bf2d170708f263693e8579e6722389d0ef (patch) | |
tree | d35f621f82ec6addff9639fc60ab4937004e5243 /dm/DMWriteTask.h | |
parent | 0063a9b69a6a5d377f207c2aa1ea1e7220c19ba9 (diff) |
Sketch DM refactor.
BUG=skia:3255
I think this supports everything DM used to, but has completely refactored how
it works to fit the design in the bug.
Configs like "tiles-gpu" are automatically wired up.
I wouldn't suggest looking at this as a diff. There's just a bunch of deleted
files, a few new files, and one new file that shares a name with a deleted file
(DM.cpp).
NOTREECHECKS=true
Committed: https://skia.googlesource.com/skia/+/709d2c3e5062c5b57f91273bfc11a751f5b2bb88
Review URL: https://codereview.chromium.org/788243008
Diffstat (limited to 'dm/DMWriteTask.h')
-rw-r--r-- | dm/DMWriteTask.h | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/dm/DMWriteTask.h b/dm/DMWriteTask.h deleted file mode 100644 index fb80058fd0..0000000000 --- a/dm/DMWriteTask.h +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef DMWriteTask_DEFINED -#define DMWriteTask_DEFINED - -#include "DMTask.h" -#include "SkBitmap.h" -#include "SkStream.h" -#include "SkString.h" -#include "SkTArray.h" - - -// Writes a bitmap to a file. - -namespace DM { - -class WriteTask : public CpuTask { - -public: - WriteTask(const Task& parent, // WriteTask must be a child task. - const char* sourceType, // E.g. "GM", "SKP". For humans. - 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. - const char* sourceType, // E.g. "GM", "SKP". For humans. - SkStreamAsset* data, // Pre-encoded data to write to disk. - const char* ext); // File extension. - - void draw() SK_OVERRIDE; - bool shouldSkip() const SK_OVERRIDE; - SkString name() const SK_OVERRIDE; - -private: - SkTArray<SkString> fSuffixes; - const SkString fBaseName; - const SkString fSourceType; - const SkBitmap fBitmap; - SkAutoTDelete<SkStreamAsset> fData; - const char* fExtension; - - void makeDirOrFail(SkString dir); -}; - -} // namespace DM - -#endif // DMWriteTask_DEFINED |