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