| 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/debug/traced_value.h" | 10 #include "cc/debug/traced_value.h" |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 vertical->SetVisibleToTotalLengthRatio( | 335 vertical->SetVisibleToTotalLengthRatio( |
| 336 scrollable_viewport.height() / ScrollableSize().height()); | 336 scrollable_viewport.height() / ScrollableSize().height()); |
| 337 } | 337 } |
| 338 } | 338 } |
| 339 | 339 |
| 340 void LayerTreeImpl::UpdateDrawProperties() { | 340 void LayerTreeImpl::UpdateDrawProperties() { |
| 341 if (IsActiveTree() && RootScrollLayer() && RootContainerLayer()) | 341 if (IsActiveTree() && RootScrollLayer() && RootContainerLayer()) |
| 342 UpdateRootScrollLayerSizeDelta(); | 342 UpdateRootScrollLayerSizeDelta(); |
| 343 | 343 |
| 344 if (IsActiveTree() && | 344 if (IsActiveTree() && |
| 345 RootContainerLayer() | 345 RootContainerLayer() && |
| 346 && !RootContainerLayer()->masks_to_bounds()) { | 346 !RootContainerLayer()->masks_to_bounds()) { |
| 347 UpdateSolidColorScrollbars(); | 347 UpdateSolidColorScrollbars(); |
| 348 } | 348 } |
| 349 | 349 |
| 350 needs_update_draw_properties_ = false; | 350 needs_update_draw_properties_ = false; |
| 351 render_surface_layer_list_.clear(); | 351 render_surface_layer_list_.clear(); |
| 352 | 352 |
| 353 // For max_texture_size. | 353 // For max_texture_size. |
| 354 if (!layer_tree_host_impl_->renderer()) | 354 if (!layer_tree_host_impl_->renderer()) |
| 355 return; | 355 return; |
| 356 | 356 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 RenderSurfaceImpl, | 398 RenderSurfaceImpl, |
| 399 LayerIteratorActions::FrontToBack> LayerIteratorType; | 399 LayerIteratorActions::FrontToBack> LayerIteratorType; |
| 400 LayerIteratorType end = LayerIteratorType::End(&render_surface_layer_list_); | 400 LayerIteratorType end = LayerIteratorType::End(&render_surface_layer_list_); |
| 401 for (LayerIteratorType it = | 401 for (LayerIteratorType it = |
| 402 LayerIteratorType::Begin(&render_surface_layer_list_); | 402 LayerIteratorType::Begin(&render_surface_layer_list_); |
| 403 it != end; | 403 it != end; |
| 404 ++it) { | 404 ++it) { |
| 405 if (!it.represents_itself()) | 405 if (!it.represents_itself()) |
| 406 continue; | 406 continue; |
| 407 LayerImpl* layer = *it; | 407 LayerImpl* layer = *it; |
| 408 if (layer->draw_properties().skip_drawing) |
| 409 continue; |
| 408 | 410 |
| 409 layer->UpdateTilePriorities(); | 411 layer->UpdateTilePriorities(); |
| 410 if (layer->mask_layer()) | 412 if (layer->mask_layer()) |
| 411 layer->mask_layer()->UpdateTilePriorities(); | 413 layer->mask_layer()->UpdateTilePriorities(); |
| 412 if (layer->replica_layer() && layer->replica_layer()->mask_layer()) | 414 if (layer->replica_layer() && layer->replica_layer()->mask_layer()) |
| 413 layer->replica_layer()->mask_layer()->UpdateTilePriorities(); | 415 layer->replica_layer()->mask_layer()->UpdateTilePriorities(); |
| 414 } | 416 } |
| 415 } | 417 } |
| 416 | 418 |
| 417 DCHECK(!needs_update_draw_properties_) << | 419 DCHECK(!needs_update_draw_properties_) << |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 765 const std::vector<LayerImpl*> LayerTreeImpl::LayersWithCopyOutputRequest() | 767 const std::vector<LayerImpl*> LayerTreeImpl::LayersWithCopyOutputRequest() |
| 766 const { | 768 const { |
| 767 // Only the active tree needs to know about layers with copy requests, as | 769 // Only the active tree needs to know about layers with copy requests, as |
| 768 // they are aborted if not serviced during draw. | 770 // they are aborted if not serviced during draw. |
| 769 DCHECK(IsActiveTree()); | 771 DCHECK(IsActiveTree()); |
| 770 | 772 |
| 771 return layers_with_copy_output_request_; | 773 return layers_with_copy_output_request_; |
| 772 } | 774 } |
| 773 | 775 |
| 774 } // namespace cc | 776 } // namespace cc |
| OLD | NEW |