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