| 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 1261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1272 for (; it != swap_promise_monitor_.end(); it++) | 1272 for (; it != swap_promise_monitor_.end(); it++) |
| 1273 (*it)->OnSetNeedsCommitOnMain(); | 1273 (*it)->OnSetNeedsCommitOnMain(); |
| 1274 } | 1274 } |
| 1275 | 1275 |
| 1276 void LayerTreeHost::QueueSwapPromise(scoped_ptr<SwapPromise> swap_promise) { | 1276 void LayerTreeHost::QueueSwapPromise(scoped_ptr<SwapPromise> swap_promise) { |
| 1277 DCHECK(swap_promise); | 1277 DCHECK(swap_promise); |
| 1278 swap_promise_list_.push_back(swap_promise.Pass()); | 1278 swap_promise_list_.push_back(swap_promise.Pass()); |
| 1279 } | 1279 } |
| 1280 | 1280 |
| 1281 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { | 1281 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { |
| 1282 for (size_t i = 0; i < swap_promise_list_.size(); i++) | 1282 for (auto* swap_promise : swap_promise_list_) |
| 1283 swap_promise_list_[i]->DidNotSwap(reason); | 1283 swap_promise->DidNotSwap(reason); |
| 1284 swap_promise_list_.clear(); | 1284 swap_promise_list_.clear(); |
| 1285 } | 1285 } |
| 1286 | 1286 |
| 1287 void LayerTreeHost::set_surface_id_namespace(uint32_t id_namespace) { | 1287 void LayerTreeHost::set_surface_id_namespace(uint32_t id_namespace) { |
| 1288 surface_id_namespace_ = id_namespace; | 1288 surface_id_namespace_ = id_namespace; |
| 1289 } | 1289 } |
| 1290 | 1290 |
| 1291 SurfaceSequence LayerTreeHost::CreateSurfaceSequence() { | 1291 SurfaceSequence LayerTreeHost::CreateSurfaceSequence() { |
| 1292 return SurfaceSequence(surface_id_namespace_, next_surface_sequence_++); | 1292 return SurfaceSequence(surface_id_namespace_, next_surface_sequence_++); |
| 1293 } | 1293 } |
| 1294 | 1294 |
| 1295 void LayerTreeHost::SetChildrenNeedBeginFrames( | 1295 void LayerTreeHost::SetChildrenNeedBeginFrames( |
| 1296 bool children_need_begin_frames) const { | 1296 bool children_need_begin_frames) const { |
| 1297 proxy_->SetChildrenNeedBeginFrames(children_need_begin_frames); | 1297 proxy_->SetChildrenNeedBeginFrames(children_need_begin_frames); |
| 1298 } | 1298 } |
| 1299 | 1299 |
| 1300 void LayerTreeHost::SendBeginFramesToChildren( | 1300 void LayerTreeHost::SendBeginFramesToChildren( |
| 1301 const BeginFrameArgs& args) const { | 1301 const BeginFrameArgs& args) const { |
| 1302 client_->SendBeginFramesToChildren(args); | 1302 client_->SendBeginFramesToChildren(args); |
| 1303 } | 1303 } |
| 1304 | 1304 |
| 1305 void LayerTreeHost::SetAuthoritativeVSyncInterval( | 1305 void LayerTreeHost::SetAuthoritativeVSyncInterval( |
| 1306 const base::TimeDelta& interval) { | 1306 const base::TimeDelta& interval) { |
| 1307 proxy_->SetAuthoritativeVSyncInterval(interval); | 1307 proxy_->SetAuthoritativeVSyncInterval(interval); |
| 1308 } | 1308 } |
| 1309 | 1309 |
| 1310 } // namespace cc | 1310 } // namespace cc |
| OLD | NEW |