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_TILE_TASK_WORKER_POOL_H_ | 5 #ifndef CC_RESOURCES_TILE_TASK_WORKER_POOL_H_ |
6 #define CC_RESOURCES_TILE_TASK_WORKER_POOL_H_ | 6 #define CC_RESOURCES_TILE_TASK_WORKER_POOL_H_ |
7 | 7 |
8 #include "base/threading/platform_thread.h" | 8 #include "base/threading/platform_thread.h" |
9 #include "cc/resources/tile_task_runner.h" | 9 #include "cc/resources/tile_task_runner.h" |
10 #include "ui/gfx/geometry/rect.h" | 10 #include "ui/gfx/geometry/rect.h" |
11 #include "ui/gfx/geometry/size.h" | 11 #include "ui/gfx/geometry/size.h" |
12 | 12 |
13 namespace base { | 13 namespace base { |
14 class SequencedTaskRunner; | 14 class SequencedTaskRunner; |
15 } | 15 } |
16 | 16 |
17 namespace cc { | 17 namespace cc { |
18 class RasterSource; | 18 class RasterSource; |
19 class RenderingStatsInstrumentation; | 19 class RenderingStatsInstrumentation; |
20 | 20 |
21 class CC_EXPORT TileTaskWorkerPool { | 21 class CC_EXPORT TileTaskWorkerPool { |
22 public: | 22 public: |
23 static unsigned kBenchmarkTaskPriority; | 23 static unsigned kBenchmarkTaskPriority; |
24 static unsigned kTaskSetFinishedTaskPriority; | 24 static unsigned kTaskSetFinishedTaskPriorityBase; |
25 static unsigned kTileTaskPriorityBase; | 25 static unsigned kTileTaskPriorityBase; |
26 | 26 |
27 TileTaskWorkerPool(); | 27 TileTaskWorkerPool(); |
28 virtual ~TileTaskWorkerPool(); | 28 virtual ~TileTaskWorkerPool(); |
29 | 29 |
30 // Set the number of threads to use for the global TaskGraphRunner instance. | 30 // Set the number of threads to use for the global TaskGraphRunner instance. |
31 // This can only be called once and must be called prior to | 31 // This can only be called once and must be called prior to |
32 // GetNumWorkerThreads(). | 32 // GetNumWorkerThreads(). |
33 static void SetNumWorkerThreads(int num_threads); | 33 static void SetNumWorkerThreads(int num_threads); |
34 | 34 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 const gfx::Rect& rect, | 78 const gfx::Rect& rect, |
79 float scale); | 79 float scale); |
80 | 80 |
81 // Type-checking downcast routine. | 81 // Type-checking downcast routine. |
82 virtual TileTaskRunner* AsTileTaskRunner() = 0; | 82 virtual TileTaskRunner* AsTileTaskRunner() = 0; |
83 }; | 83 }; |
84 | 84 |
85 } // namespace cc | 85 } // namespace cc |
86 | 86 |
87 #endif // CC_RESOURCES_TILE_TASK_WORKER_POOL_H_ | 87 #endif // CC_RESOURCES_TILE_TASK_WORKER_POOL_H_ |
OLD | NEW |