Chromium Code Reviews| 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 #ifndef CC_TREES_LAYER_TREE_HOST_H_ | 5 #ifndef CC_TREES_LAYER_TREE_HOST_H_ |
| 6 #define CC_TREES_LAYER_TREE_HOST_H_ | 6 #define CC_TREES_LAYER_TREE_HOST_H_ |
| 7 | 7 |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 304 void RemoveSwapPromiseMonitor(SwapPromiseMonitor* monitor); | 304 void RemoveSwapPromiseMonitor(SwapPromiseMonitor* monitor); |
| 305 | 305 |
| 306 // Call this function when you expect there to be a swap buffer. | 306 // Call this function when you expect there to be a swap buffer. |
| 307 // See swap_promise.h for how to use SwapPromise. | 307 // See swap_promise.h for how to use SwapPromise. |
| 308 void QueueSwapPromise(scoped_ptr<SwapPromise> swap_promise); | 308 void QueueSwapPromise(scoped_ptr<SwapPromise> swap_promise); |
| 309 | 309 |
| 310 void BreakSwapPromises(SwapPromise::DidNotSwapReason reason); | 310 void BreakSwapPromises(SwapPromise::DidNotSwapReason reason); |
| 311 | 311 |
| 312 size_t num_queued_swap_promises() const { return swap_promise_list_.size(); } | 312 size_t num_queued_swap_promises() const { return swap_promise_list_.size(); } |
| 313 | 313 |
| 314 void trace_commit() { | |
|
Yufeng Shen (Slow to review)
2015/06/16 15:11:05
Can you use Camel style ? underscore style is usua
| |
| 315 for (unsigned int i = 0; i < num_queued_swap_promises(); i++) { | |
| 316 SwapPromise* swap_promise_ = swap_promise_list_.at(i); | |
| 317 | |
| 318 swap_promise_->OnCommit(); | |
| 319 } | |
|
Yufeng Shen (Slow to review)
2015/06/16 15:11:05
It can be simplified like this:
for (auto* swap_p
| |
| 320 } | |
| 321 | |
| 314 void set_surface_id_namespace(uint32_t id_namespace); | 322 void set_surface_id_namespace(uint32_t id_namespace); |
| 315 SurfaceSequence CreateSurfaceSequence(); | 323 SurfaceSequence CreateSurfaceSequence(); |
| 316 | 324 |
| 317 void SetChildrenNeedBeginFrames(bool children_need_begin_frames) const; | 325 void SetChildrenNeedBeginFrames(bool children_need_begin_frames) const; |
| 318 void SendBeginFramesToChildren(const BeginFrameArgs& args) const; | 326 void SendBeginFramesToChildren(const BeginFrameArgs& args) const; |
| 319 | 327 |
| 320 void SetAuthoritativeVSyncInterval(const base::TimeDelta& interval); | 328 void SetAuthoritativeVSyncInterval(const base::TimeDelta& interval); |
| 321 | 329 |
| 322 PropertyTrees* property_trees() { return &property_trees_; } | 330 PropertyTrees* property_trees() { return &property_trees_; } |
| 323 bool needs_meta_info_recomputation() { | 331 bool needs_meta_info_recomputation() { |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 489 | 497 |
| 490 uint32_t surface_id_namespace_; | 498 uint32_t surface_id_namespace_; |
| 491 uint32_t next_surface_sequence_; | 499 uint32_t next_surface_sequence_; |
| 492 | 500 |
| 493 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 501 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
| 494 }; | 502 }; |
| 495 | 503 |
| 496 } // namespace cc | 504 } // namespace cc |
| 497 | 505 |
| 498 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 506 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
| OLD | NEW |