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

Unified Diff: dm/DMCpuTask.cpp

Issue 179233005: DM: make GPU tasks multithreaded again. Big refactor. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: default 1 GPU thread Created 6 years, 10 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/DMCpuTask.h ('k') | dm/DMExpectationsTask.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DMCpuTask.cpp
diff --git a/dm/DMCpuTask.cpp b/dm/DMCpuTask.cpp
deleted file mode 100644
index acbe8d2185442663b2c62f4a4931f7e8201d03f0..0000000000000000000000000000000000000000
--- a/dm/DMCpuTask.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-#include "DMCpuTask.h"
-#include "DMExpectationsTask.h"
-#include "DMPipeTask.h"
-#include "DMReplayTask.h"
-#include "DMSerializeTask.h"
-#include "DMTileGridTask.h"
-#include "DMUtil.h"
-#include "DMWriteTask.h"
-
-namespace DM {
-
-CpuTask::CpuTask(const char* config,
- Reporter* reporter,
- TaskRunner* taskRunner,
- const Expectations& expectations,
- skiagm::GMRegistry::Factory gmFactory,
- SkColorType colorType)
- : Task(reporter, taskRunner)
- , fGMFactory(gmFactory)
- , fGM(fGMFactory(NULL))
- , fName(UnderJoin(fGM->getName(), config))
- , fExpectations(expectations)
- , fColorType(colorType)
- {}
-
-void CpuTask::draw() {
- SkBitmap bitmap;
- SetupBitmap(fColorType, fGM.get(), &bitmap);
-
- SkCanvas canvas(bitmap);
- canvas.concat(fGM->getInitialTransform());
- fGM->draw(&canvas);
- canvas.flush();
-
-#define SPAWN(ChildTask, ...) this->spawnChild(SkNEW_ARGS(ChildTask, (*this, __VA_ARGS__)))
- SPAWN(ExpectationsTask, fExpectations, bitmap);
-
- 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));
-
- SPAWN(WriteTask, bitmap);
-#undef SPAWN
-}
-
-bool CpuTask::shouldSkip() const {
- if (kRGB_565_SkColorType == fColorType && (fGM->getFlags() & skiagm::GM::kSkip565_Flag)) {
- return true;
- }
- if (fGM->getFlags() & skiagm::GM::kGPUOnly_Flag) {
- return true;
- }
- return false;
-}
-
-} // namespace DM
« no previous file with comments | « dm/DMCpuTask.h ('k') | dm/DMExpectationsTask.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698