2013-10-19 00:52:44 +04:00
|
|
|
#ifndef DMWriteTask_DEFINED
|
|
|
|
#define DMWriteTask_DEFINED
|
|
|
|
|
|
|
|
#include "DMTask.h"
|
|
|
|
#include "SkBitmap.h"
|
|
|
|
#include "SkString.h"
|
|
|
|
|
|
|
|
// Writes a bitmap to a file.
|
|
|
|
|
|
|
|
namespace DM {
|
|
|
|
|
|
|
|
class WriteTask : public Task {
|
|
|
|
|
|
|
|
public:
|
2013-12-02 17:36:22 +04:00
|
|
|
WriteTask(const Task& parent, SkBitmap bitmap);
|
2013-10-19 00:52:44 +04:00
|
|
|
|
|
|
|
virtual void draw() SK_OVERRIDE;
|
|
|
|
virtual bool usesGpu() const SK_OVERRIDE { return false; }
|
|
|
|
virtual bool shouldSkip() const SK_OVERRIDE;
|
|
|
|
virtual SkString name() const SK_OVERRIDE;
|
|
|
|
|
|
|
|
private:
|
2013-12-02 17:36:22 +04:00
|
|
|
SkString fConfig;
|
2013-10-19 00:52:44 +04:00
|
|
|
SkString fGmName;
|
|
|
|
const SkBitmap fBitmap;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace DM
|
|
|
|
|
|
|
|
#endif // DMWriteTask_DEFINED
|