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 1496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1552 | 1553 |
1553 active_tree_->GetViewportSelection(&metadata.selection); | 1554 active_tree_->GetViewportSelection(&metadata.selection); |
1554 | 1555 |
1555 if (OuterViewportScrollLayer()) { | 1556 if (OuterViewportScrollLayer()) { |
1556 metadata.root_overflow_x_hidden = | 1557 metadata.root_overflow_x_hidden = |
1557 !OuterViewportScrollLayer()->user_scrollable_horizontal(); | 1558 !OuterViewportScrollLayer()->user_scrollable_horizontal(); |
1558 metadata.root_overflow_y_hidden = | 1559 metadata.root_overflow_y_hidden = |
1559 !OuterViewportScrollLayer()->user_scrollable_vertical(); | 1560 !OuterViewportScrollLayer()->user_scrollable_vertical(); |
1560 } | 1561 } |
1561 | 1562 |
| 1563 for (LayerImpl* surface_layer : active_tree_->SurfaceLayers()) { |
| 1564 metadata.referenced_surfaces.push_back( |
| 1565 static_cast<SurfaceLayerImpl*>(surface_layer)->surface_id()); |
| 1566 } |
1562 if (!InnerViewportScrollLayer()) | 1567 if (!InnerViewportScrollLayer()) |
1563 return metadata; | 1568 return metadata; |
1564 | 1569 |
1565 metadata.root_overflow_x_hidden |= | 1570 metadata.root_overflow_x_hidden |= |
1566 !InnerViewportScrollLayer()->user_scrollable_horizontal(); | 1571 !InnerViewportScrollLayer()->user_scrollable_horizontal(); |
1567 metadata.root_overflow_y_hidden |= | 1572 metadata.root_overflow_y_hidden |= |
1568 !InnerViewportScrollLayer()->user_scrollable_vertical(); | 1573 !InnerViewportScrollLayer()->user_scrollable_vertical(); |
1569 | 1574 |
1570 // TODO(miletus) : Change the metadata to hold ScrollOffset. | 1575 // TODO(miletus) : Change the metadata to hold ScrollOffset. |
1571 metadata.root_scroll_offset = gfx::ScrollOffsetToVector2dF( | 1576 metadata.root_scroll_offset = gfx::ScrollOffsetToVector2dF( |
(...skipping 2122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3694 return task_runner_provider_->HasImplThread(); | 3699 return task_runner_provider_->HasImplThread(); |
3695 } | 3700 } |
3696 | 3701 |
3697 bool LayerTreeHostImpl::CommitToActiveTree() const { | 3702 bool LayerTreeHostImpl::CommitToActiveTree() const { |
3698 // In single threaded mode we skip the pending tree and commit directly to the | 3703 // In single threaded mode we skip the pending tree and commit directly to the |
3699 // active tree. | 3704 // active tree. |
3700 return !task_runner_provider_->HasImplThread(); | 3705 return !task_runner_provider_->HasImplThread(); |
3701 } | 3706 } |
3702 | 3707 |
3703 } // namespace cc | 3708 } // namespace cc |
OLD | NEW |