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 #include "cc/output/context_cache_controller.h" | 5 #include "cc/output/context_cache_controller.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "base/single_thread_task_runner.h" | |
11 #include "base/synchronization/lock.h" | 10 #include "base/synchronization/lock.h" |
12 #include "gpu/command_buffer/client/context_support.h" | 11 #include "gpu/command_buffer/client/context_support.h" |
13 #include "third_party/skia/include/gpu/GrContext.h" | 12 #include "third_party/skia/include/gpu/GrContext.h" |
14 | 13 |
15 namespace cc { | 14 namespace cc { |
16 namespace { | 15 namespace { |
17 static const int kIdleCleanupDelaySeconds = 1; | 16 static const int kIdleCleanupDelaySeconds = 1; |
18 } // namespace | 17 } // namespace |
19 | 18 |
20 ContextCacheController::ScopedToken::ScopedToken() = default; | 19 ContextCacheController::ScopedToken::ScopedToken() = default; |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 context_support_->SetAggressivelyFreeResources(true); | 165 context_support_->SetAggressivelyFreeResources(true); |
167 context_support_->SetAggressivelyFreeResources(false); | 166 context_support_->SetAggressivelyFreeResources(false); |
168 | 167 |
169 callback_pending_ = false; | 168 callback_pending_ = false; |
170 | 169 |
171 if (context_lock_) | 170 if (context_lock_) |
172 context_lock_->Release(); | 171 context_lock_->Release(); |
173 } | 172 } |
174 | 173 |
175 } // namespace cc | 174 } // namespace cc |
OLD | NEW |