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

Side by Side Diff: cc/raster/tile_task.h

Issue 2003353003: cc: Ensure members needed on task completion get called on valid thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_task_new_state_in_dtor
Patch Set: another approach, feedback Created 4 years, 7 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 | cc/tiles/tile_manager.h » ('j') | cc/tiles/tile_manager.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_RASTER_TILE_TASK_H_ 5 #ifndef CC_RASTER_TILE_TASK_H_
6 #define CC_RASTER_TILE_TASK_H_ 6 #define CC_RASTER_TILE_TASK_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "cc/raster/task.h" 10 #include "cc/raster/task.h"
11 11
12 namespace cc { 12 namespace cc {
13 13
14 class CC_EXPORT TileTask : public Task { 14 class CC_EXPORT TileTask : public Task {
15 public: 15 public:
16 typedef std::vector<scoped_refptr<TileTask>> Vector; 16 typedef std::vector<scoped_refptr<TileTask>> Vector;
17 17
18 struct TaskCompletionInfo {};
19
18 const TileTask::Vector& dependencies() const { return dependencies_; } 20 const TileTask::Vector& dependencies() const { return dependencies_; }
19 21
20 // Indicates whether this TileTask can be run at the same time as other tasks 22 // Indicates whether this TileTask can be run at the same time as other tasks
21 // in the task graph. If false, this task will be scheduled with 23 // in the task graph. If false, this task will be scheduled with
22 // TASK_CATEGORY_NONCONCURRENT_FOREGROUND. 24 // TASK_CATEGORY_NONCONCURRENT_FOREGROUND.
23 bool supports_concurrent_execution() const { 25 bool supports_concurrent_execution() const {
24 return supports_concurrent_execution_; 26 return supports_concurrent_execution_;
25 } 27 }
26 28
27 virtual void OnTaskCompleted() = 0; 29 virtual void OnTaskCompleted() = 0;
28 30
29 protected: 31 protected:
30 explicit TileTask(bool supports_concurrent_execution); 32 explicit TileTask(bool supports_concurrent_execution);
31 TileTask(bool supports_concurrent_execution, TileTask::Vector* dependencies); 33 TileTask(bool supports_concurrent_execution, TileTask::Vector* dependencies);
32 ~TileTask() override; 34 ~TileTask() override;
33 35
34 const bool supports_concurrent_execution_; 36 const bool supports_concurrent_execution_;
35 TileTask::Vector dependencies_; 37 TileTask::Vector dependencies_;
36 }; 38 };
37 39
38 } // namespace cc 40 } // namespace cc
39 41
40 #endif // CC_RASTER_TILE_TASK_H_ 42 #endif // CC_RASTER_TILE_TASK_H_
OLDNEW
« no previous file with comments | « no previous file | cc/tiles/tile_manager.h » ('j') | cc/tiles/tile_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698