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

Unified Diff: dm/DMTask.h

Issue 88773002: DM: write failed comparison mode .pngs one more level deep in the tree. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: depth() instead 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dm/DM.cpp ('k') | dm/DMTask.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DMTask.h
diff --git a/dm/DMTask.h b/dm/DMTask.h
index 5388196ffdb6f7c0b7e85a2c31b74354678e44f7..0d3ef74cc37c518b2c7a96f571ddae9b511b65ff 100644
--- a/dm/DMTask.h
+++ b/dm/DMTask.h
@@ -18,7 +18,7 @@ class TaskRunner;
class Task : public SkRunnable {
public:
Task(Reporter* reporter, TaskRunner* taskRunner);
- Task(const Task& that);
+ Task(const Task& parent);
virtual ~Task();
void run() SK_OVERRIDE;
@@ -28,6 +28,10 @@ public:
virtual bool shouldSkip() const = 0;
virtual SkString name() const = 0;
+ // Returns the number of parents above this task.
+ // Top-level tasks return 0, their children 1, and so on.
+ int depth() const { return fDepth; }
+
protected:
void spawnChild(Task* task);
void fail();
@@ -36,6 +40,7 @@ private:
// Both unowned.
Reporter* fReporter;
TaskRunner* fTaskRunner;
+ int fDepth;
typedef SkRunnable INHERITED;
};
« no previous file with comments | « dm/DM.cpp ('k') | dm/DMTask.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698