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_in_process.h" | 5 #include "cc/trees/layer_tree_host_in_process.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
861 | 861 |
862 if (layer_tree_->root_layer()) { | 862 if (layer_tree_->root_layer()) { |
863 for (size_t i = 0; i < info->scrolls.size(); ++i) { | 863 for (size_t i = 0; i < info->scrolls.size(); ++i) { |
864 Layer* layer = layer_tree_->LayerById(info->scrolls[i].layer_id); | 864 Layer* layer = layer_tree_->LayerById(info->scrolls[i].layer_id); |
865 if (!layer) | 865 if (!layer) |
866 continue; | 866 continue; |
867 layer->SetScrollOffsetFromImplSide(gfx::ScrollOffsetWithDelta( | 867 layer->SetScrollOffsetFromImplSide(gfx::ScrollOffsetWithDelta( |
868 layer->scroll_offset(), info->scrolls[i].scroll_delta)); | 868 layer->scroll_offset(), info->scrolls[i].scroll_delta)); |
869 SetNeedsUpdateLayers(); | 869 SetNeedsUpdateLayers(); |
870 } | 870 } |
| 871 for (size_t i = 0; i < info->scrollbars.size(); ++i) { |
| 872 Layer* layer = layer_tree_->LayerById(info->scrollbars[i].layer_id); |
| 873 if (!layer) |
| 874 continue; |
| 875 layer->SetScrollbarsHiddenFromImplSide(info->scrollbars[i].hidden); |
| 876 } |
871 } | 877 } |
872 | 878 |
873 // This needs to happen after scroll deltas have been sent to prevent top | 879 // This needs to happen after scroll deltas have been sent to prevent top |
874 // controls from clamping the layout viewport both on the compositor and | 880 // controls from clamping the layout viewport both on the compositor and |
875 // on the main thread. | 881 // on the main thread. |
876 ApplyViewportDeltas(info); | 882 ApplyViewportDeltas(info); |
877 } | 883 } |
878 | 884 |
879 const base::WeakPtr<InputHandler>& LayerTreeHostInProcess::GetInputHandler() | 885 const base::WeakPtr<InputHandler>& LayerTreeHostInProcess::GetInputHandler() |
880 const { | 886 const { |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1023 | 1029 |
1024 debug_state_.FromProtobuf(proto.debug_state()); | 1030 debug_state_.FromProtobuf(proto.debug_state()); |
1025 has_gpu_rasterization_trigger_ = proto.has_gpu_rasterization_trigger(); | 1031 has_gpu_rasterization_trigger_ = proto.has_gpu_rasterization_trigger(); |
1026 content_is_suitable_for_gpu_rasterization_ = | 1032 content_is_suitable_for_gpu_rasterization_ = |
1027 proto.content_is_suitable_for_gpu_rasterization(); | 1033 proto.content_is_suitable_for_gpu_rasterization(); |
1028 id_ = proto.id(); | 1034 id_ = proto.id(); |
1029 next_commit_forces_redraw_ = proto.next_commit_forces_redraw(); | 1035 next_commit_forces_redraw_ = proto.next_commit_forces_redraw(); |
1030 } | 1036 } |
1031 | 1037 |
1032 } // namespace cc | 1038 } // namespace cc |
OLD | NEW |