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

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

Issue 2018353005: cc: Fix data race in cc::TaskState::IsFinished. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: feedback Created 4 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 | « cc/raster/raster_buffer_provider_perftest.cc ('k') | cc/raster/tile_task.cc » ('j') | no next file with comments »
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"
(...skipping 10 matching lines...) Expand all
21 // in the task graph. If false, this task will be scheduled with 21 // in the task graph. If false, this task will be scheduled with
22 // TASK_CATEGORY_NONCONCURRENT_FOREGROUND. 22 // TASK_CATEGORY_NONCONCURRENT_FOREGROUND.
23 bool supports_concurrent_execution() const { 23 bool supports_concurrent_execution() const {
24 return supports_concurrent_execution_; 24 return supports_concurrent_execution_;
25 } 25 }
26 26
27 // This function should be called from origin thread to process the completion 27 // This function should be called from origin thread to process the completion
28 // of the task. 28 // of the task.
29 virtual void OnTaskCompleted() = 0; 29 virtual void OnTaskCompleted() = 0;
30 30
31 void DidComplete();
32 bool HasCompleted() const;
33
31 protected: 34 protected:
32 explicit TileTask(bool supports_concurrent_execution); 35 explicit TileTask(bool supports_concurrent_execution);
33 TileTask(bool supports_concurrent_execution, TileTask::Vector* dependencies); 36 TileTask(bool supports_concurrent_execution, TileTask::Vector* dependencies);
34 ~TileTask() override; 37 ~TileTask() override;
35 38
36 const bool supports_concurrent_execution_; 39 const bool supports_concurrent_execution_;
37 TileTask::Vector dependencies_; 40 TileTask::Vector dependencies_;
41 bool did_complete_;
38 }; 42 };
39 43
40 } // namespace cc 44 } // namespace cc
41 45
42 #endif // CC_RASTER_TILE_TASK_H_ 46 #endif // CC_RASTER_TILE_TASK_H_
OLDNEW
« no previous file with comments | « cc/raster/raster_buffer_provider_perftest.cc ('k') | cc/raster/tile_task.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698