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 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 25 matching lines...) Expand all Loading... |
36 #include "cc/input/scroll_elasticity_helper.h" | 36 #include "cc/input/scroll_elasticity_helper.h" |
37 #include "cc/input/scroll_state.h" | 37 #include "cc/input/scroll_state.h" |
38 #include "cc/input/top_controls_manager.h" | 38 #include "cc/input/top_controls_manager.h" |
39 #include "cc/layers/append_quads_data.h" | 39 #include "cc/layers/append_quads_data.h" |
40 #include "cc/layers/heads_up_display_layer_impl.h" | 40 #include "cc/layers/heads_up_display_layer_impl.h" |
41 #include "cc/layers/layer_impl.h" | 41 #include "cc/layers/layer_impl.h" |
42 #include "cc/layers/layer_iterator.h" | 42 #include "cc/layers/layer_iterator.h" |
43 #include "cc/layers/painted_scrollbar_layer_impl.h" | 43 #include "cc/layers/painted_scrollbar_layer_impl.h" |
44 #include "cc/layers/render_surface_impl.h" | 44 #include "cc/layers/render_surface_impl.h" |
45 #include "cc/layers/scrollbar_layer_impl_base.h" | 45 #include "cc/layers/scrollbar_layer_impl_base.h" |
46 #include "cc/layers/surface_layer_impl.h" | |
47 #include "cc/layers/viewport.h" | 46 #include "cc/layers/viewport.h" |
48 #include "cc/output/compositor_frame_metadata.h" | 47 #include "cc/output/compositor_frame_metadata.h" |
49 #include "cc/output/copy_output_request.h" | 48 #include "cc/output/copy_output_request.h" |
50 #include "cc/output/delegating_renderer.h" | 49 #include "cc/output/delegating_renderer.h" |
51 #include "cc/output/gl_renderer.h" | 50 #include "cc/output/gl_renderer.h" |
52 #include "cc/output/software_renderer.h" | 51 #include "cc/output/software_renderer.h" |
53 #include "cc/output/texture_mailbox_deleter.h" | 52 #include "cc/output/texture_mailbox_deleter.h" |
54 #include "cc/quads/render_pass_draw_quad.h" | 53 #include "cc/quads/render_pass_draw_quad.h" |
55 #include "cc/quads/shared_quad_state.h" | 54 #include "cc/quads/shared_quad_state.h" |
56 #include "cc/quads/solid_color_draw_quad.h" | 55 #include "cc/quads/solid_color_draw_quad.h" |
(...skipping 1499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1556 | 1555 |
1557 active_tree_->GetViewportSelection(&metadata.selection); | 1556 active_tree_->GetViewportSelection(&metadata.selection); |
1558 | 1557 |
1559 if (OuterViewportScrollLayer()) { | 1558 if (OuterViewportScrollLayer()) { |
1560 metadata.root_overflow_x_hidden = | 1559 metadata.root_overflow_x_hidden = |
1561 !OuterViewportScrollLayer()->user_scrollable_horizontal(); | 1560 !OuterViewportScrollLayer()->user_scrollable_horizontal(); |
1562 metadata.root_overflow_y_hidden = | 1561 metadata.root_overflow_y_hidden = |
1563 !OuterViewportScrollLayer()->user_scrollable_vertical(); | 1562 !OuterViewportScrollLayer()->user_scrollable_vertical(); |
1564 } | 1563 } |
1565 | 1564 |
1566 for (LayerImpl* surface_layer : active_tree_->SurfaceLayers()) { | |
1567 metadata.referenced_surfaces.push_back( | |
1568 static_cast<SurfaceLayerImpl*>(surface_layer)->surface_id()); | |
1569 } | |
1570 if (!InnerViewportScrollLayer()) | 1565 if (!InnerViewportScrollLayer()) |
1571 return metadata; | 1566 return metadata; |
1572 | 1567 |
1573 metadata.root_overflow_x_hidden |= | 1568 metadata.root_overflow_x_hidden |= |
1574 !InnerViewportScrollLayer()->user_scrollable_horizontal(); | 1569 !InnerViewportScrollLayer()->user_scrollable_horizontal(); |
1575 metadata.root_overflow_y_hidden |= | 1570 metadata.root_overflow_y_hidden |= |
1576 !InnerViewportScrollLayer()->user_scrollable_vertical(); | 1571 !InnerViewportScrollLayer()->user_scrollable_vertical(); |
1577 | 1572 |
1578 // TODO(miletus) : Change the metadata to hold ScrollOffset. | 1573 // TODO(miletus) : Change the metadata to hold ScrollOffset. |
1579 metadata.root_scroll_offset = gfx::ScrollOffsetToVector2dF( | 1574 metadata.root_scroll_offset = gfx::ScrollOffsetToVector2dF( |
(...skipping 2140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3720 return task_runner_provider_->HasImplThread(); | 3715 return task_runner_provider_->HasImplThread(); |
3721 } | 3716 } |
3722 | 3717 |
3723 bool LayerTreeHostImpl::CommitToActiveTree() const { | 3718 bool LayerTreeHostImpl::CommitToActiveTree() const { |
3724 // In single threaded mode we skip the pending tree and commit directly to the | 3719 // In single threaded mode we skip the pending tree and commit directly to the |
3725 // active tree. | 3720 // active tree. |
3726 return !task_runner_provider_->HasImplThread(); | 3721 return !task_runner_provider_->HasImplThread(); |
3727 } | 3722 } |
3728 | 3723 |
3729 } // namespace cc | 3724 } // namespace cc |
OLD | NEW |