OLD | NEW |
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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_OUTPUT_CONTEXT_CACHE_CONTROLLER_H_ | 5 #ifndef CC_OUTPUT_CONTEXT_CACHE_CONTROLLER_H_ |
6 #define CC_OUTPUT_CONTEXT_CACHE_CONTROLLER_H_ | 6 #define CC_OUTPUT_CONTEXT_CACHE_CONTROLLER_H_ |
7 | 7 |
8 #include <cstdint> | 8 #include <cstdint> |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "base/single_thread_task_runner.h" |
14 #include "cc/base/cc_export.h" | 15 #include "cc/base/cc_export.h" |
15 | 16 |
16 class GrContext; | 17 class GrContext; |
17 | 18 |
18 namespace base { | 19 namespace base { |
19 class Lock; | 20 class Lock; |
20 class SingleThreadTaskRunner; | |
21 } | 21 } |
22 | 22 |
23 namespace gpu { | 23 namespace gpu { |
24 class ContextSupport; | 24 class ContextSupport; |
25 } | 25 } |
26 | 26 |
27 namespace cc { | 27 namespace cc { |
28 | 28 |
29 // ContextCacheController manages clearing cached data on ContextProvider when | 29 // ContextCacheController manages clearing cached data on ContextProvider when |
30 // appropriate. Currently, cache clearing is triggered when the Context | 30 // appropriate. Currently, cache clearing is triggered when the Context |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 base::Lock current_idle_generation_lock_; | 101 base::Lock current_idle_generation_lock_; |
102 uint32_t current_idle_generation_ = 0; | 102 uint32_t current_idle_generation_ = 0; |
103 | 103 |
104 base::WeakPtr<ContextCacheController> weak_ptr_; | 104 base::WeakPtr<ContextCacheController> weak_ptr_; |
105 base::WeakPtrFactory<ContextCacheController> weak_factory_; | 105 base::WeakPtrFactory<ContextCacheController> weak_factory_; |
106 }; | 106 }; |
107 | 107 |
108 } // namespace cc | 108 } // namespace cc |
109 | 109 |
110 #endif // CC_OUTPUT_CONTEXT_CACHE_CONTROLLER_H_ | 110 #endif // CC_OUTPUT_CONTEXT_CACHE_CONTROLLER_H_ |
OLD | NEW |