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 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1047 DCHECK_GE(frame->render_passes.size(), position_from_end); | 1047 DCHECK_GE(frame->render_passes.size(), position_from_end); |
1048 } | 1048 } |
1049 } | 1049 } |
1050 } | 1050 } |
1051 | 1051 |
1052 DrawResult LayerTreeHostImpl::PrepareToDraw(FrameData* frame) { | 1052 DrawResult LayerTreeHostImpl::PrepareToDraw(FrameData* frame) { |
1053 TRACE_EVENT1("cc", | 1053 TRACE_EVENT1("cc", |
1054 "LayerTreeHostImpl::PrepareToDraw", | 1054 "LayerTreeHostImpl::PrepareToDraw", |
1055 "SourceFrameNumber", | 1055 "SourceFrameNumber", |
1056 active_tree_->source_frame_number()); | 1056 active_tree_->source_frame_number()); |
| 1057 if (input_handler_client_) |
| 1058 input_handler_client_->ReconcileElasticOverscrollAndRootScroll(); |
| 1059 |
1057 // This will cause NotifyTileStateChanged() to be called for any visible tiles | 1060 // This will cause NotifyTileStateChanged() to be called for any visible tiles |
1058 // that completed, which will add damage to the frame for them so they appear | 1061 // that completed, which will add damage to the frame for them so they appear |
1059 // as part of the current frame being drawn. | 1062 // as part of the current frame being drawn. |
1060 if (settings().impl_side_painting) | 1063 if (settings().impl_side_painting) |
1061 tile_manager_->UpdateVisibleTiles(); | 1064 tile_manager_->UpdateVisibleTiles(); |
1062 | 1065 |
1063 UMA_HISTOGRAM_CUSTOM_COUNTS( | 1066 UMA_HISTOGRAM_CUSTOM_COUNTS( |
1064 "Compositing.NumActiveLayers", active_tree_->NumLayers(), 1, 400, 20); | 1067 "Compositing.NumActiveLayers", active_tree_->NumLayers(), 1, 400, 20); |
1065 | 1068 |
1066 bool ok = active_tree_->UpdateDrawProperties(); | 1069 bool ok = active_tree_->UpdateDrawProperties(); |
(...skipping 2411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3478 } | 3481 } |
3479 | 3482 |
3480 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { | 3483 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { |
3481 std::vector<PictureLayerImpl*>::iterator it = | 3484 std::vector<PictureLayerImpl*>::iterator it = |
3482 std::find(picture_layers_.begin(), picture_layers_.end(), layer); | 3485 std::find(picture_layers_.begin(), picture_layers_.end(), layer); |
3483 DCHECK(it != picture_layers_.end()); | 3486 DCHECK(it != picture_layers_.end()); |
3484 picture_layers_.erase(it); | 3487 picture_layers_.erase(it); |
3485 } | 3488 } |
3486 | 3489 |
3487 } // namespace cc | 3490 } // namespace cc |
OLD | NEW |