aboutsummaryrefslogtreecommitdiffhomepage
path: root/dm/DMCpuTask.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dm/DMCpuTask.cpp')
-rw-r--r--dm/DMCpuTask.cpp24
1 files changed, 13 insertions, 11 deletions
diff --git a/dm/DMCpuTask.cpp b/dm/DMCpuTask.cpp
index 1d1d4010f7..3f51c8a318 100644
--- a/dm/DMCpuTask.cpp
+++ b/dm/DMCpuTask.cpp
@@ -1,7 +1,9 @@
#include "DMCpuTask.h"
+#include "DMChecksumTask.h"
#include "DMPipeTask.h"
#include "DMReplayTask.h"
#include "DMSerializeTask.h"
+#include "DMTileGridTask.h"
#include "DMUtil.h"
#include "DMWriteTask.h"
@@ -30,19 +32,19 @@ void CpuTask::draw() {
fGM->draw(&canvas);
canvas.flush();
- if (!MeetsExpectations(fExpectations, bitmap)) {
- this->fail();
- }
-
- this->spawnChild(SkNEW_ARGS(PipeTask, (*this, fGMFactory(NULL), bitmap, false, false)));
- this->spawnChild(SkNEW_ARGS(PipeTask, (*this, fGMFactory(NULL), bitmap, true, false)));
- this->spawnChild(SkNEW_ARGS(PipeTask, (*this, fGMFactory(NULL), bitmap, true, true)));
+#define SPAWN(ChildTask, ...) this->spawnChild(SkNEW_ARGS(ChildTask, (*this, __VA_ARGS__)))
+ SPAWN(ChecksumTask, fExpectations, bitmap);
- this->spawnChild(SkNEW_ARGS(ReplayTask, (*this, fGMFactory(NULL), bitmap, true)));
- this->spawnChild(SkNEW_ARGS(ReplayTask, (*this, fGMFactory(NULL), bitmap, false)));
+ SPAWN(PipeTask, fGMFactory(NULL), bitmap, false, false);
+ SPAWN(PipeTask, fGMFactory(NULL), bitmap, true, false);
+ SPAWN(PipeTask, fGMFactory(NULL), bitmap, true, true);
+ SPAWN(ReplayTask, fGMFactory(NULL), bitmap, false);
+ SPAWN(ReplayTask, fGMFactory(NULL), bitmap, true);
+ SPAWN(SerializeTask, fGMFactory(NULL), bitmap);
+ SPAWN(TileGridTask, fGMFactory(NULL), bitmap, SkISize::Make(16,16));
- this->spawnChild(SkNEW_ARGS(SerializeTask, (*this, fGMFactory(NULL), bitmap)));
- this->spawnChild(SkNEW_ARGS(WriteTask, (*this, bitmap)));
+ SPAWN(WriteTask, bitmap);
+#undef SPAWN
}
bool CpuTask::shouldSkip() const {