Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CC_RASTER_TILE_TASK_H_ | |
| 6 #define CC_RASTER_TILE_TASK_H_ | |
| 7 | |
| 8 #include <stdint.h> | |
|
ericrk
2016/04/20 00:22:29
is anything using stdint.h? Same for other include
prashant.n
2016/04/20 02:04:48
Yes I'll remove callback/resource_format after che
| |
| 9 | |
| 10 #include <vector> | |
| 11 | |
| 12 #include "base/callback.h" | |
| 13 #include "cc/raster/raster_buffer.h" | |
| 14 #include "cc/raster/task.h" | |
| 15 #include "cc/resources/resource_format.h" | |
| 16 | |
| 17 namespace cc { | |
| 18 | |
| 19 class CC_EXPORT TileTask : public Task { | |
| 20 public: | |
| 21 typedef std::vector<scoped_refptr<TileTask>> Vector; | |
| 22 | |
| 23 const TileTask::Vector& dependencies() const { return dependencies_; } | |
| 24 | |
| 25 // Indicates whether this TileTask can be run at the same time as other tasks | |
| 26 // in the task graph. If false, this task will be scheduled with | |
| 27 // TASK_CATEGORY_NONCONCURRENT_FOREGROUND. The base implementation always | |
|
ericrk
2016/04/20 00:22:29
nit: remove the comment "The base implementation a
| |
| 28 // returns true. | |
| 29 bool SupportsConcurrentExecution() const { | |
|
ericrk
2016/04/20 00:22:29
Per David's comment on crrev.com/1890903002, pleas
prashant.n
2016/04/20 02:04:48
Now I understand why few functions do not use came
| |
| 30 return supports_concurrent_execution_; | |
| 31 } | |
| 32 | |
| 33 virtual void ScheduleOnOriginThread(RasterBufferProvider* provider) = 0; | |
| 34 virtual void CompleteOnOriginThread(RasterBufferProvider* provider) = 0; | |
| 35 | |
| 36 void WillSchedule(); | |
| 37 void DidSchedule(); | |
| 38 bool HasBeenScheduled() const; | |
| 39 | |
| 40 void WillComplete(); | |
| 41 void DidComplete(); | |
| 42 bool HasCompleted() const; | |
| 43 | |
| 44 protected: | |
| 45 explicit TileTask(bool supports_concurrent_execution); | |
| 46 TileTask(bool supports_concurrent_execution, TileTask::Vector* dependencies); | |
| 47 ~TileTask() override; | |
| 48 | |
| 49 const bool supports_concurrent_execution_; | |
| 50 TileTask::Vector dependencies_; | |
| 51 bool did_schedule_; | |
| 52 bool did_complete_; | |
| 53 }; | |
| 54 | |
| 55 } // namespace cc | |
| 56 | |
| 57 #endif // CC_RASTER_TILE_TASK_H_ | |
| OLD | NEW |