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

Side by Side Diff: dm/DMReplayTask.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, 9 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 | « dm/DMReplayTask.h ('k') | dm/DMSerializeTask.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 "DMReplayTask.h" 1 #include "DMReplayTask.h"
2 #include "DMWriteTask.h" 2 #include "DMWriteTask.h"
3 #include "DMUtil.h" 3 #include "DMUtil.h"
4 4
5 #include "SkCommandLineFlags.h" 5 #include "SkCommandLineFlags.h"
6 #include "SkPicture.h" 6 #include "SkPicture.h"
7 7
8 DEFINE_bool(replay, true, "If true, run picture replay tests."); 8 DEFINE_bool(replay, true, "If true, run picture replay tests.");
9 DEFINE_bool(rtree, true, "If true, run picture replay tests with an rtree."); 9 DEFINE_bool(rtree, true, "If true, run picture replay tests with an rtree.");
10 10
11 namespace DM { 11 namespace DM {
12 12
13 ReplayTask::ReplayTask(const Task& parent, 13 ReplayTask::ReplayTask(const Task& parent,
14 skiagm::GM* gm, 14 skiagm::GM* gm,
15 SkBitmap reference, 15 SkBitmap reference,
16 bool useRTree) 16 bool useRTree)
17 : Task(parent) 17 : CpuTask(parent)
18 , fName(UnderJoin(parent.name().c_str(), useRTree ? "rtree" : "replay")) 18 , fName(UnderJoin(parent.name().c_str(), useRTree ? "rtree" : "replay"))
19 , fGM(gm) 19 , fGM(gm)
20 , fReference(reference) 20 , fReference(reference)
21 , fUseRTree(useRTree) 21 , fUseRTree(useRTree)
22 {} 22 {}
23 23
24 void ReplayTask::draw() { 24 void ReplayTask::draw() {
25 SkPicture recorded; 25 SkPicture recorded;
26 const uint32_t flags = fUseRTree ? SkPicture::kOptimizeForClippedPlayback_Re cordingFlag : 0; 26 const uint32_t flags = fUseRTree ? SkPicture::kOptimizeForClippedPlayback_Re cordingFlag : 0;
27 RecordPicture(fGM.get(), &recorded, flags); 27 RecordPicture(fGM.get(), &recorded, flags);
(...skipping 15 matching lines...) Expand all
43 if (FLAGS_rtree && fUseRTree) { 43 if (FLAGS_rtree && fUseRTree) {
44 return (fGM->getFlags() & skiagm::GM::kSkipTiled_Flag) != 0; 44 return (fGM->getFlags() & skiagm::GM::kSkipTiled_Flag) != 0;
45 } 45 }
46 if (FLAGS_replay && !fUseRTree) { 46 if (FLAGS_replay && !fUseRTree) {
47 return false; 47 return false;
48 } 48 }
49 return true; 49 return true;
50 } 50 }
51 51
52 } // namespace DM 52 } // namespace DM
OLDNEW
« no previous file with comments | « dm/DMReplayTask.h ('k') | dm/DMSerializeTask.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698