| 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 1525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1581 | 1582 |
| 1582 active_tree_->GetViewportSelection(&metadata.selection); | 1583 active_tree_->GetViewportSelection(&metadata.selection); |
| 1583 | 1584 |
| 1584 if (OuterViewportScrollLayer()) { | 1585 if (OuterViewportScrollLayer()) { |
| 1585 metadata.root_overflow_x_hidden = | 1586 metadata.root_overflow_x_hidden = |
| 1586 !OuterViewportScrollLayer()->user_scrollable_horizontal(); | 1587 !OuterViewportScrollLayer()->user_scrollable_horizontal(); |
| 1587 metadata.root_overflow_y_hidden = | 1588 metadata.root_overflow_y_hidden = |
| 1588 !OuterViewportScrollLayer()->user_scrollable_vertical(); | 1589 !OuterViewportScrollLayer()->user_scrollable_vertical(); |
| 1589 } | 1590 } |
| 1590 | 1591 |
| 1592 for (LayerImpl* surface_layer : active_tree_->SurfaceLayers()) { |
| 1593 metadata.referenced_surfaces.push_back( |
| 1594 static_cast<SurfaceLayerImpl*>(surface_layer)->surface_id()); |
| 1595 } |
| 1591 if (!InnerViewportScrollLayer()) | 1596 if (!InnerViewportScrollLayer()) |
| 1592 return metadata; | 1597 return metadata; |
| 1593 | 1598 |
| 1594 metadata.root_overflow_x_hidden |= | 1599 metadata.root_overflow_x_hidden |= |
| 1595 !InnerViewportScrollLayer()->user_scrollable_horizontal(); | 1600 !InnerViewportScrollLayer()->user_scrollable_horizontal(); |
| 1596 metadata.root_overflow_y_hidden |= | 1601 metadata.root_overflow_y_hidden |= |
| 1597 !InnerViewportScrollLayer()->user_scrollable_vertical(); | 1602 !InnerViewportScrollLayer()->user_scrollable_vertical(); |
| 1598 | 1603 |
| 1599 // TODO(miletus) : Change the metadata to hold ScrollOffset. | 1604 // TODO(miletus) : Change the metadata to hold ScrollOffset. |
| 1600 metadata.root_scroll_offset = gfx::ScrollOffsetToVector2dF( | 1605 metadata.root_scroll_offset = gfx::ScrollOffsetToVector2dF( |
| (...skipping 2151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3752 return task_runner_provider_->HasImplThread(); | 3757 return task_runner_provider_->HasImplThread(); |
| 3753 } | 3758 } |
| 3754 | 3759 |
| 3755 bool LayerTreeHostImpl::CommitToActiveTree() const { | 3760 bool LayerTreeHostImpl::CommitToActiveTree() const { |
| 3756 // In single threaded mode we skip the pending tree and commit directly to the | 3761 // In single threaded mode we skip the pending tree and commit directly to the |
| 3757 // active tree. | 3762 // active tree. |
| 3758 return !task_runner_provider_->HasImplThread(); | 3763 return !task_runner_provider_->HasImplThread(); |
| 3759 } | 3764 } |
| 3760 | 3765 |
| 3761 } // namespace cc | 3766 } // namespace cc |
| OLD | NEW |