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

Side by Side Diff: dm/DMTask.cpp

Issue 76903002: Fix a warning building DM using ninja on Mac. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « dm/DMTask.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include "DMTask.h" 1 #include "DMTask.h"
2 2
3 #include "DMTaskRunner.h" 3 #include "DMTaskRunner.h"
4 #include "DMUtil.h" 4 #include "DMUtil.h"
5 #include "SkBitmap.h" 5 #include "SkBitmap.h"
6 #include "SkCommandLineFlags.h" 6 #include "SkCommandLineFlags.h"
7 7
8 namespace DM { 8 namespace DM {
9 9
10 Task::Task(Reporter* reporter, TaskRunner* taskRunner) 10 Task::Task(Reporter* reporter, TaskRunner* taskRunner)
11 : fReporter(reporter), fTaskRunner(taskRunner) { 11 : fReporter(reporter), fTaskRunner(taskRunner) {
12 fReporter->start(); 12 fReporter->start();
13 } 13 }
14 14
15 Task::Task(const Task& that) : fReporter(that.fReporter), fTaskRunner(that.fTask Runner) { 15 Task::Task(const Task& that)
16 : INHERITED(that)
17 , fReporter(that.fReporter)
18 , fTaskRunner(that.fTaskRunner) {
16 fReporter->start(); 19 fReporter->start();
17 } 20 }
18 21
19 Task::~Task() {} 22 Task::~Task() {}
20 23
21 void Task::run() { 24 void Task::run() {
22 if (!this->shouldSkip()) { 25 if (!this->shouldSkip()) {
23 this->draw(); 26 this->draw();
24 } 27 }
25 fReporter->finish(); 28 fReporter->finish();
26 fReporter->updateStatusLine(); 29 fReporter->updateStatusLine();
27 delete this; 30 delete this;
28 } 31 }
29 32
30 void Task::spawnChild(Task* task) { 33 void Task::spawnChild(Task* task) {
31 if (!task->usesGpu()) { 34 if (!task->usesGpu()) {
32 fTaskRunner->add(task); 35 fTaskRunner->add(task);
33 } else { 36 } else {
34 SkDEBUGFAIL("Sorry, we can't spawn GPU tasks. :( See comment in TaskRun ner::wait()."); 37 SkDEBUGFAIL("Sorry, we can't spawn GPU tasks. :( See comment in TaskRun ner::wait().");
35 } 38 }
36 } 39 }
37 40
38 void Task::fail() { 41 void Task::fail() {
39 fReporter->fail(this->name()); 42 fReporter->fail(this->name());
40 } 43 }
41 44
42 } // namespace DM 45 } // namespace DM
OLDNEW
« no previous file with comments | « dm/DMTask.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698