| 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 1514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1570 | 1571 |
| 1571 active_tree_->GetViewportSelection(&metadata.selection); | 1572 active_tree_->GetViewportSelection(&metadata.selection); |
| 1572 | 1573 |
| 1573 if (OuterViewportScrollLayer()) { | 1574 if (OuterViewportScrollLayer()) { |
| 1574 metadata.root_overflow_x_hidden = | 1575 metadata.root_overflow_x_hidden = |
| 1575 !OuterViewportScrollLayer()->user_scrollable_horizontal(); | 1576 !OuterViewportScrollLayer()->user_scrollable_horizontal(); |
| 1576 metadata.root_overflow_y_hidden = | 1577 metadata.root_overflow_y_hidden = |
| 1577 !OuterViewportScrollLayer()->user_scrollable_vertical(); | 1578 !OuterViewportScrollLayer()->user_scrollable_vertical(); |
| 1578 } | 1579 } |
| 1579 | 1580 |
| 1581 for (LayerImpl* surface_layer : active_tree_->SurfaceLayers()) { |
| 1582 metadata.referenced_surfaces.push_back( |
| 1583 static_cast<SurfaceLayerImpl*>(surface_layer)->surface_id()); |
| 1584 } |
| 1580 if (!InnerViewportScrollLayer()) | 1585 if (!InnerViewportScrollLayer()) |
| 1581 return metadata; | 1586 return metadata; |
| 1582 | 1587 |
| 1583 metadata.root_overflow_x_hidden |= | 1588 metadata.root_overflow_x_hidden |= |
| 1584 !InnerViewportScrollLayer()->user_scrollable_horizontal(); | 1589 !InnerViewportScrollLayer()->user_scrollable_horizontal(); |
| 1585 metadata.root_overflow_y_hidden |= | 1590 metadata.root_overflow_y_hidden |= |
| 1586 !InnerViewportScrollLayer()->user_scrollable_vertical(); | 1591 !InnerViewportScrollLayer()->user_scrollable_vertical(); |
| 1587 | 1592 |
| 1588 // TODO(miletus) : Change the metadata to hold ScrollOffset. | 1593 // TODO(miletus) : Change the metadata to hold ScrollOffset. |
| 1589 metadata.root_scroll_offset = gfx::ScrollOffsetToVector2dF( | 1594 metadata.root_scroll_offset = gfx::ScrollOffsetToVector2dF( |
| (...skipping 2133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3723 return task_runner_provider_->HasImplThread(); | 3728 return task_runner_provider_->HasImplThread(); |
| 3724 } | 3729 } |
| 3725 | 3730 |
| 3726 bool LayerTreeHostImpl::CommitToActiveTree() const { | 3731 bool LayerTreeHostImpl::CommitToActiveTree() const { |
| 3727 // In single threaded mode we skip the pending tree and commit directly to the | 3732 // In single threaded mode we skip the pending tree and commit directly to the |
| 3728 // active tree. | 3733 // active tree. |
| 3729 return !task_runner_provider_->HasImplThread(); | 3734 return !task_runner_provider_->HasImplThread(); |
| 3730 } | 3735 } |
| 3731 | 3736 |
| 3732 } // namespace cc | 3737 } // namespace cc |
| OLD | NEW |