OLD | NEW |
---|---|
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_RUNNER_H_ | 5 #ifndef CC_RASTER_TILE_TASK_RUNNER_H_ |
6 #define CC_RASTER_TILE_TASK_RUNNER_H_ | 6 #define CC_RASTER_TILE_TASK_RUNNER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
51 ~TileTask() override; | 51 ~TileTask() override; |
52 | 52 |
53 bool did_schedule_; | 53 bool did_schedule_; |
54 bool did_complete_; | 54 bool did_complete_; |
55 }; | 55 }; |
56 | 56 |
57 class CC_EXPORT ImageDecodeTask : public TileTask { | 57 class CC_EXPORT ImageDecodeTask : public TileTask { |
58 public: | 58 public: |
59 typedef std::vector<scoped_refptr<ImageDecodeTask>> Vector; | 59 typedef std::vector<scoped_refptr<ImageDecodeTask>> Vector; |
60 | 60 |
61 // Whether this ImageDecodeTask can be run at the same time as other tasks in | |
vmpstr
2016/03/28 23:55:52
Maybe "Indicates whether ..."?
ericrk
2016/03/29 23:11:29
Done.
| |
62 // the task graph. If false, this task will be scheduled with | |
63 // TASK_CATEGORY_NONCONCURRENT_FOREGROUND. The base implementation always | |
64 // returns true. | |
65 virtual bool SupportsConcurrentExecution() const; | |
66 | |
67 // Returns an optional task which this task depends on. May be null. | |
68 const scoped_refptr<ImageDecodeTask>& dependency() { return dependency_; } | |
69 | |
61 protected: | 70 protected: |
62 ImageDecodeTask(); | 71 ImageDecodeTask(); |
72 explicit ImageDecodeTask(scoped_refptr<ImageDecodeTask> dependency); | |
63 ~ImageDecodeTask() override; | 73 ~ImageDecodeTask() override; |
74 | |
75 private: | |
76 scoped_refptr<ImageDecodeTask> dependency_; | |
64 }; | 77 }; |
65 | 78 |
66 class CC_EXPORT RasterTask : public TileTask { | 79 class CC_EXPORT RasterTask : public TileTask { |
67 public: | 80 public: |
68 typedef std::vector<scoped_refptr<RasterTask>> Vector; | 81 typedef std::vector<scoped_refptr<RasterTask>> Vector; |
69 | 82 |
70 const ImageDecodeTask::Vector& dependencies() const { return dependencies_; } | 83 const ImageDecodeTask::Vector& dependencies() const { return dependencies_; } |
71 | 84 |
72 protected: | 85 protected: |
73 explicit RasterTask(ImageDecodeTask::Vector* dependencies); | 86 explicit RasterTask(ImageDecodeTask::Vector* dependencies); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
106 protected: | 119 protected: |
107 // Check if resource format matches output format. | 120 // Check if resource format matches output format. |
108 static bool ResourceFormatRequiresSwizzle(ResourceFormat format); | 121 static bool ResourceFormatRequiresSwizzle(ResourceFormat format); |
109 | 122 |
110 virtual ~TileTaskRunner() {} | 123 virtual ~TileTaskRunner() {} |
111 }; | 124 }; |
112 | 125 |
113 } // namespace cc | 126 } // namespace cc |
114 | 127 |
115 #endif // CC_RASTER_TILE_TASK_RUNNER_H_ | 128 #endif // CC_RASTER_TILE_TASK_RUNNER_H_ |
OLD | NEW |