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

Side by Side Diff: dm/DMCpuGMTask.cpp

Issue 345553003: Support serialization in SkRecord-backed SkPictures. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: robert Created 6 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | dm/DMRecordTask.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include "DMCpuGMTask.h" 1 #include "DMCpuGMTask.h"
2 #include "DMExpectationsTask.h" 2 #include "DMExpectationsTask.h"
3 #include "DMPipeTask.h" 3 #include "DMPipeTask.h"
4 #include "DMQuiltTask.h" 4 #include "DMQuiltTask.h"
5 #include "DMRecordTask.h"
6 #include "DMReplayTask.h" 5 #include "DMReplayTask.h"
7 #include "DMSerializeTask.h" 6 #include "DMSerializeTask.h"
8 #include "DMUtil.h" 7 #include "DMUtil.h"
9 #include "DMWriteTask.h" 8 #include "DMWriteTask.h"
10 9
11 namespace DM { 10 namespace DM {
12 11
13 CpuGMTask::CpuGMTask(const char* config, 12 CpuGMTask::CpuGMTask(const char* config,
14 Reporter* reporter, 13 Reporter* reporter,
15 TaskRunner* taskRunner, 14 TaskRunner* taskRunner,
(...skipping 16 matching lines...) Expand all
32 canvas.concat(fGM->getInitialTransform()); 31 canvas.concat(fGM->getInitialTransform());
33 fGM->draw(&canvas); 32 fGM->draw(&canvas);
34 canvas.flush(); 33 canvas.flush();
35 34
36 #define SPAWN(ChildTask, ...) this->spawnChild(SkNEW_ARGS(ChildTask, (*this, __V A_ARGS__))) 35 #define SPAWN(ChildTask, ...) this->spawnChild(SkNEW_ARGS(ChildTask, (*this, __V A_ARGS__)))
37 SPAWN(ExpectationsTask, fExpectations, bitmap); 36 SPAWN(ExpectationsTask, fExpectations, bitmap);
38 37
39 SPAWN(PipeTask, fGMFactory(NULL), bitmap, PipeTask::kInProcess_Mode); 38 SPAWN(PipeTask, fGMFactory(NULL), bitmap, PipeTask::kInProcess_Mode);
40 SPAWN(PipeTask, fGMFactory(NULL), bitmap, PipeTask::kCrossProcess_Mode); 39 SPAWN(PipeTask, fGMFactory(NULL), bitmap, PipeTask::kCrossProcess_Mode);
41 SPAWN(PipeTask, fGMFactory(NULL), bitmap, PipeTask::kSharedAddress_Mode); 40 SPAWN(PipeTask, fGMFactory(NULL), bitmap, PipeTask::kSharedAddress_Mode);
41
42 SPAWN(QuiltTask, fGMFactory(NULL), bitmap); 42 SPAWN(QuiltTask, fGMFactory(NULL), bitmap);
43 SPAWN(RecordTask, fGMFactory(NULL), bitmap, RecordTask::kOptimize_Mode); 43
44 SPAWN(RecordTask, fGMFactory(NULL), bitmap, RecordTask::kNoOptimize_Mode);
45 SPAWN(ReplayTask, fGMFactory(NULL), bitmap, ReplayTask::kNormal_Mode); 44 SPAWN(ReplayTask, fGMFactory(NULL), bitmap, ReplayTask::kNormal_Mode);
46 SPAWN(ReplayTask, fGMFactory(NULL), bitmap, ReplayTask::kRTree_Mode); 45 SPAWN(ReplayTask, fGMFactory(NULL), bitmap, ReplayTask::kRTree_Mode);
47 SPAWN(SerializeTask, fGMFactory(NULL), bitmap); 46 SPAWN(ReplayTask, fGMFactory(NULL), bitmap, ReplayTask::kSkRecord_Mode);
47
48 SPAWN(SerializeTask, fGMFactory(NULL), bitmap, SerializeTask::kNormal_Mode);
49 SPAWN(SerializeTask, fGMFactory(NULL), bitmap, SerializeTask::kSkRecord_Mode );
48 50
49 SPAWN(WriteTask, bitmap); 51 SPAWN(WriteTask, bitmap);
50 #undef SPAWN 52 #undef SPAWN
51 } 53 }
52 54
53 bool CpuGMTask::shouldSkip() const { 55 bool CpuGMTask::shouldSkip() const {
54 if (kRGB_565_SkColorType == fColorType && (fGM->getFlags() & skiagm::GM::kSk ip565_Flag)) { 56 if (kRGB_565_SkColorType == fColorType && (fGM->getFlags() & skiagm::GM::kSk ip565_Flag)) {
55 return true; 57 return true;
56 } 58 }
57 if (fGM->getFlags() & skiagm::GM::kGPUOnly_Flag) { 59 if (fGM->getFlags() & skiagm::GM::kGPUOnly_Flag) {
58 return true; 60 return true;
59 } 61 }
60 return false; 62 return false;
61 } 63 }
62 64
63 } // namespace DM 65 } // namespace DM
OLDNEW
« no previous file with comments | « no previous file | dm/DMRecordTask.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698