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_impl.h" | 5 #include "cc/trees/layer_tree_host_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 3098 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3109 void LayerTreeHostImpl::SetTreePriority(TreePriority priority) { | 3109 void LayerTreeHostImpl::SetTreePriority(TreePriority priority) { |
3110 if (!tile_manager_) | 3110 if (!tile_manager_) |
3111 return; | 3111 return; |
3112 | 3112 |
3113 if (global_tile_state_.tree_priority == priority) | 3113 if (global_tile_state_.tree_priority == priority) |
3114 return; | 3114 return; |
3115 global_tile_state_.tree_priority = priority; | 3115 global_tile_state_.tree_priority = priority; |
3116 DidModifyTilePriorities(); | 3116 DidModifyTilePriorities(); |
3117 } | 3117 } |
3118 | 3118 |
| 3119 TreePriority LayerTreeHostImpl::GetTreePriority() const { |
| 3120 return global_tile_state_.tree_priority; |
| 3121 } |
| 3122 |
3119 void LayerTreeHostImpl::UpdateCurrentBeginFrameArgs( | 3123 void LayerTreeHostImpl::UpdateCurrentBeginFrameArgs( |
3120 const BeginFrameArgs& args) { | 3124 const BeginFrameArgs& args) { |
3121 DCHECK(!current_begin_frame_args_.IsValid()); | 3125 DCHECK(!current_begin_frame_args_.IsValid()); |
3122 current_begin_frame_args_ = args; | 3126 current_begin_frame_args_ = args; |
3123 // TODO(skyostil): Stop overriding the frame time once the usage of frame | 3127 // TODO(skyostil): Stop overriding the frame time once the usage of frame |
3124 // timing is unified. | 3128 // timing is unified. |
3125 current_begin_frame_args_.frame_time = gfx::FrameTime::Now(); | 3129 current_begin_frame_args_.frame_time = gfx::FrameTime::Now(); |
3126 } | 3130 } |
3127 | 3131 |
3128 void LayerTreeHostImpl::ResetCurrentBeginFrameArgsForNextFrame() { | 3132 void LayerTreeHostImpl::ResetCurrentBeginFrameArgsForNextFrame() { |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3375 } | 3379 } |
3376 | 3380 |
3377 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { | 3381 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { |
3378 std::vector<PictureLayerImpl*>::iterator it = | 3382 std::vector<PictureLayerImpl*>::iterator it = |
3379 std::find(picture_layers_.begin(), picture_layers_.end(), layer); | 3383 std::find(picture_layers_.begin(), picture_layers_.end(), layer); |
3380 DCHECK(it != picture_layers_.end()); | 3384 DCHECK(it != picture_layers_.end()); |
3381 picture_layers_.erase(it); | 3385 picture_layers_.erase(it); |
3382 } | 3386 } |
3383 | 3387 |
3384 } // namespace cc | 3388 } // namespace cc |
OLD | NEW |