OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_RASTER_WORKER_POOL_H_ | 5 #ifndef CC_RESOURCES_RASTER_WORKER_POOL_H_ |
6 #define CC_RESOURCES_RASTER_WORKER_POOL_H_ | 6 #define CC_RESOURCES_RASTER_WORKER_POOL_H_ |
7 | 7 |
8 #include "cc/resources/rasterizer.h" | 8 #include "cc/resources/rasterizer.h" |
9 #include "ui/gfx/geometry/size.h" | 9 #include "ui/gfx/geometry/size.h" |
10 | 10 |
11 namespace base { | 11 namespace base { |
12 class SequencedTaskRunner; | 12 class SequencedTaskRunner; |
13 } | 13 } |
14 | 14 |
15 namespace cc { | 15 namespace cc { |
16 | 16 |
17 class CC_EXPORT RasterWorkerPool { | 17 class CC_EXPORT RasterWorkerPool { |
18 public: | 18 public: |
19 static unsigned kOnDemandRasterTaskPriority; | |
20 static unsigned kBenchmarkRasterTaskPriority; | 19 static unsigned kBenchmarkRasterTaskPriority; |
21 static unsigned kRasterFinishedTaskPriority; | 20 static unsigned kRasterFinishedTaskPriority; |
22 static unsigned kRasterTaskPriorityBase; | 21 static unsigned kRasterTaskPriorityBase; |
23 | 22 |
24 RasterWorkerPool(); | 23 RasterWorkerPool(); |
25 virtual ~RasterWorkerPool(); | 24 virtual ~RasterWorkerPool(); |
26 | 25 |
27 // Set the number of threads to use for the global TaskGraphRunner instance. | 26 // Set the number of threads to use for the global TaskGraphRunner instance. |
28 // This can only be called once and must be called prior to | 27 // This can only be called once and must be called prior to |
29 // GetNumRasterThreads(). | 28 // GetNumRasterThreads(). |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 uint8_t* buffer, | 72 uint8_t* buffer, |
74 ResourceFormat format); | 73 ResourceFormat format); |
75 | 74 |
76 // Type-checking downcast routine. | 75 // Type-checking downcast routine. |
77 virtual Rasterizer* AsRasterizer() = 0; | 76 virtual Rasterizer* AsRasterizer() = 0; |
78 }; | 77 }; |
79 | 78 |
80 } // namespace cc | 79 } // namespace cc |
81 | 80 |
82 #endif // CC_RESOURCES_RASTER_WORKER_POOL_H_ | 81 #endif // CC_RESOURCES_RASTER_WORKER_POOL_H_ |
OLD | NEW |