| 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_RESOURCES_RASTERIZER_H_ | 5 #ifndef CC_RESOURCES_RASTERIZER_H_ |
| 6 #define CC_RESOURCES_RASTERIZER_H_ | 6 #define CC_RESOURCES_RASTERIZER_H_ |
| 7 | 7 |
| 8 #include <bitset> | 8 #include <bitset> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 | 80 |
| 81 protected: | 81 protected: |
| 82 RasterTask(const Resource* resource, ImageDecodeTask::Vector* dependencies); | 82 RasterTask(const Resource* resource, ImageDecodeTask::Vector* dependencies); |
| 83 virtual ~RasterTask(); | 83 virtual ~RasterTask(); |
| 84 | 84 |
| 85 private: | 85 private: |
| 86 const Resource* resource_; | 86 const Resource* resource_; |
| 87 ImageDecodeTask::Vector dependencies_; | 87 ImageDecodeTask::Vector dependencies_; |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 static const size_t kNumberOfTaskSets = 2; | 90 static const size_t kNumberOfTaskSets = 3; |
| 91 typedef size_t TaskSet; | 91 typedef size_t TaskSet; |
| 92 typedef std::bitset<kNumberOfTaskSets> TaskSetCollection; | 92 typedef std::bitset<kNumberOfTaskSets> TaskSetCollection; |
| 93 | 93 |
| 94 class CC_EXPORT RasterizerClient { | 94 class CC_EXPORT RasterizerClient { |
| 95 public: | 95 public: |
| 96 virtual void DidFinishRunningTasks(TaskSet task_set) = 0; | 96 virtual void DidFinishRunningTasks(TaskSet task_set) = 0; |
| 97 virtual TaskSetCollection TasksThatShouldBeForcedToComplete() const = 0; | 97 virtual TaskSetCollection TasksThatShouldBeForcedToComplete() const = 0; |
| 98 | 98 |
| 99 protected: | 99 protected: |
| 100 virtual ~RasterizerClient() {} | 100 virtual ~RasterizerClient() {} |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 // Check for completed tasks and dispatch reply callbacks. | 155 // Check for completed tasks and dispatch reply callbacks. |
| 156 virtual void CheckForCompletedTasks() = 0; | 156 virtual void CheckForCompletedTasks() = 0; |
| 157 | 157 |
| 158 protected: | 158 protected: |
| 159 virtual ~Rasterizer() {} | 159 virtual ~Rasterizer() {} |
| 160 }; | 160 }; |
| 161 | 161 |
| 162 } // namespace cc | 162 } // namespace cc |
| 163 | 163 |
| 164 #endif // CC_RESOURCES_RASTERIZER_H_ | 164 #endif // CC_RESOURCES_RASTERIZER_H_ |
| OLD | NEW |