| 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_impl.h" | 5 #include "cc/trees/layer_tree_impl.h" |
| 6 | 6 |
| 7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
| 8 #include "cc/animation/keyframed_animation_curve.h" | 8 #include "cc/animation/keyframed_animation_curve.h" |
| 9 #include "cc/animation/scrollbar_animation_controller.h" | 9 #include "cc/animation/scrollbar_animation_controller.h" |
| 10 #include "cc/base/math_util.h" | 10 #include "cc/base/math_util.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 LayerTreeImpl::LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl) | 25 LayerTreeImpl::LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl) |
| 26 : layer_tree_host_impl_(layer_tree_host_impl), | 26 : layer_tree_host_impl_(layer_tree_host_impl), |
| 27 source_frame_number_(-1), | 27 source_frame_number_(-1), |
| 28 hud_layer_(0), | 28 hud_layer_(0), |
| 29 root_scroll_layer_(NULL), | 29 root_scroll_layer_(NULL), |
| 30 currently_scrolling_layer_(NULL), | 30 currently_scrolling_layer_(NULL), |
| 31 root_layer_scroll_offset_delegate_(NULL), | 31 root_layer_scroll_offset_delegate_(NULL), |
| 32 background_color_(0), | 32 background_color_(0), |
| 33 has_transparent_background_(false), | 33 has_transparent_background_(false), |
| 34 has_fixed_to_bottom_edge_layer_(false), |
| 34 page_scale_layer_(NULL), | 35 page_scale_layer_(NULL), |
| 35 inner_viewport_scroll_layer_(NULL), | 36 inner_viewport_scroll_layer_(NULL), |
| 36 outer_viewport_scroll_layer_(NULL), | 37 outer_viewport_scroll_layer_(NULL), |
| 37 page_scale_factor_(1), | 38 page_scale_factor_(1), |
| 38 page_scale_delta_(1), | 39 page_scale_delta_(1), |
| 39 sent_page_scale_delta_(1), | 40 sent_page_scale_delta_(1), |
| 40 min_page_scale_factor_(0), | 41 min_page_scale_factor_(0), |
| 41 max_page_scale_factor_(0), | 42 max_page_scale_factor_(0), |
| 42 scrolling_layer_id_from_previous_tree_(0), | 43 scrolling_layer_id_from_previous_tree_(0), |
| 43 contents_textures_purged_(false), | 44 contents_textures_purged_(false), |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 root_layer(), | 382 root_layer(), |
| 382 DrawViewportSize(), | 383 DrawViewportSize(), |
| 383 layer_tree_host_impl_->DrawTransform(), | 384 layer_tree_host_impl_->DrawTransform(), |
| 384 device_scale_factor(), | 385 device_scale_factor(), |
| 385 total_page_scale_factor(), | 386 total_page_scale_factor(), |
| 386 page_scale_layer, | 387 page_scale_layer, |
| 387 MaxTextureSize(), | 388 MaxTextureSize(), |
| 388 settings().can_use_lcd_text, | 389 settings().can_use_lcd_text, |
| 389 can_render_to_separate_surface, | 390 can_render_to_separate_surface, |
| 390 settings().layer_transforms_should_scale_layer_contents, | 391 settings().layer_transforms_should_scale_layer_contents, |
| 391 &render_surface_layer_list_); | 392 &render_surface_layer_list_, |
| 393 &has_fixed_to_bottom_edge_layer_); |
| 392 LayerTreeHostCommon::CalculateDrawProperties(&inputs); | 394 LayerTreeHostCommon::CalculateDrawProperties(&inputs); |
| 393 } | 395 } |
| 394 | 396 |
| 395 { | 397 { |
| 396 TRACE_EVENT2("cc", | 398 TRACE_EVENT2("cc", |
| 397 "LayerTreeImpl::UpdateTilePriorities", | 399 "LayerTreeImpl::UpdateTilePriorities", |
| 398 "IsActive", | 400 "IsActive", |
| 399 IsActiveTree(), | 401 IsActiveTree(), |
| 400 "SourceFrameNumber", | 402 "SourceFrameNumber", |
| 401 source_frame_number_); | 403 source_frame_number_); |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 790 const std::vector<LayerImpl*>& LayerTreeImpl::LayersWithCopyOutputRequest() | 792 const std::vector<LayerImpl*>& LayerTreeImpl::LayersWithCopyOutputRequest() |
| 791 const { | 793 const { |
| 792 // Only the active tree needs to know about layers with copy requests, as | 794 // Only the active tree needs to know about layers with copy requests, as |
| 793 // they are aborted if not serviced during draw. | 795 // they are aborted if not serviced during draw. |
| 794 DCHECK(IsActiveTree()); | 796 DCHECK(IsActiveTree()); |
| 795 | 797 |
| 796 return layers_with_copy_output_request_; | 798 return layers_with_copy_output_request_; |
| 797 } | 799 } |
| 798 | 800 |
| 799 } // namespace cc | 801 } // namespace cc |
| OLD | NEW |