OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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/trees/layer_tree_host.h" | 5 #include "cc/trees/layer_tree_host.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <stack> | 8 #include <stack> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 return CreateFailedButTryAgain; | 227 return CreateFailedButTryAgain; |
228 } | 228 } |
229 | 229 |
230 void LayerTreeHost::DeleteContentsTexturesOnImplThread( | 230 void LayerTreeHost::DeleteContentsTexturesOnImplThread( |
231 ResourceProvider* resource_provider) { | 231 ResourceProvider* resource_provider) { |
232 DCHECK(proxy_->IsImplThread()); | 232 DCHECK(proxy_->IsImplThread()); |
233 if (contents_texture_manager_) | 233 if (contents_texture_manager_) |
234 contents_texture_manager_->ClearAllMemory(resource_provider); | 234 contents_texture_manager_->ClearAllMemory(resource_provider); |
235 } | 235 } |
236 | 236 |
237 void LayerTreeHost::AcquireLayerTextures() { | |
238 DCHECK(proxy_->IsMainThread()); | |
239 proxy_->AcquireLayerTextures(); | |
240 } | |
241 | |
242 void LayerTreeHost::DidBeginMainFrame() { | 237 void LayerTreeHost::DidBeginMainFrame() { |
243 client_->DidBeginMainFrame(); | 238 client_->DidBeginMainFrame(); |
244 } | 239 } |
245 | 240 |
246 void LayerTreeHost::UpdateClientAnimations(base::TimeTicks frame_begin_time) { | 241 void LayerTreeHost::UpdateClientAnimations(base::TimeTicks frame_begin_time) { |
247 animating_ = true; | 242 animating_ = true; |
248 client_->Animate(frame_begin_time); | 243 client_->Animate(frame_begin_time); |
249 animating_ = false; | 244 animating_ = false; |
250 } | 245 } |
251 | 246 |
(...skipping 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1253 swap_promise_list_.push_back(swap_promise.Pass()); | 1248 swap_promise_list_.push_back(swap_promise.Pass()); |
1254 } | 1249 } |
1255 | 1250 |
1256 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { | 1251 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { |
1257 for (size_t i = 0; i < swap_promise_list_.size(); i++) | 1252 for (size_t i = 0; i < swap_promise_list_.size(); i++) |
1258 swap_promise_list_[i]->DidNotSwap(reason); | 1253 swap_promise_list_[i]->DidNotSwap(reason); |
1259 swap_promise_list_.clear(); | 1254 swap_promise_list_.clear(); |
1260 } | 1255 } |
1261 | 1256 |
1262 } // namespace cc | 1257 } // namespace cc |
OLD | NEW |