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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 | 348 |
349 { | 349 { |
350 TRACE_EVENT2("cc", | 350 TRACE_EVENT2("cc", |
351 "LayerTreeImpl::UpdateDrawProperties", | 351 "LayerTreeImpl::UpdateDrawProperties", |
352 "IsActive", | 352 "IsActive", |
353 IsActiveTree(), | 353 IsActiveTree(), |
354 "SourceFrameNumber", | 354 "SourceFrameNumber", |
355 source_frame_number_); | 355 source_frame_number_); |
356 LayerImpl* page_scale_layer = | 356 LayerImpl* page_scale_layer = |
357 page_scale_layer_ ? page_scale_layer_ : RootContainerLayer(); | 357 page_scale_layer_ ? page_scale_layer_ : RootContainerLayer(); |
| 358 bool can_render_to_separate_surface = |
| 359 !output_surface()->ForcedDrawToSoftwareDevice(); |
358 LayerTreeHostCommon::CalcDrawPropsImplInputs inputs( | 360 LayerTreeHostCommon::CalcDrawPropsImplInputs inputs( |
359 root_layer(), | 361 root_layer(), |
360 DrawViewportSize(), | 362 DrawViewportSize(), |
361 layer_tree_host_impl_->DrawTransform(), | 363 layer_tree_host_impl_->DrawTransform(), |
362 device_scale_factor(), | 364 device_scale_factor(), |
363 total_page_scale_factor(), | 365 total_page_scale_factor(), |
364 page_scale_layer, | 366 page_scale_layer, |
365 MaxTextureSize(), | 367 MaxTextureSize(), |
366 settings().can_use_lcd_text, | 368 settings().can_use_lcd_text, |
| 369 can_render_to_separate_surface, |
367 settings().layer_transforms_should_scale_layer_contents, | 370 settings().layer_transforms_should_scale_layer_contents, |
368 &render_surface_layer_list_); | 371 &render_surface_layer_list_); |
369 LayerTreeHostCommon::CalculateDrawProperties(&inputs); | 372 LayerTreeHostCommon::CalculateDrawProperties(&inputs); |
370 } | 373 } |
371 | 374 |
372 DCHECK(!needs_update_draw_properties_) << | 375 DCHECK(!needs_update_draw_properties_) << |
373 "CalcDrawProperties should not set_needs_update_draw_properties()"; | 376 "CalcDrawProperties should not set_needs_update_draw_properties()"; |
374 } | 377 } |
375 | 378 |
376 const LayerImplList& LayerTreeImpl::RenderSurfaceLayerList() const { | 379 const LayerImplList& LayerTreeImpl::RenderSurfaceLayerList() const { |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
715 const std::vector<LayerImpl*> LayerTreeImpl::LayersWithCopyOutputRequest() | 718 const std::vector<LayerImpl*> LayerTreeImpl::LayersWithCopyOutputRequest() |
716 const { | 719 const { |
717 // Only the active tree needs to know about layers with copy requests, as | 720 // Only the active tree needs to know about layers with copy requests, as |
718 // they are aborted if not serviced during draw. | 721 // they are aborted if not serviced during draw. |
719 DCHECK(IsActiveTree()); | 722 DCHECK(IsActiveTree()); |
720 | 723 |
721 return layers_with_copy_output_request_; | 724 return layers_with_copy_output_request_; |
722 } | 725 } |
723 | 726 |
724 } // namespace cc | 727 } // namespace cc |
OLD | NEW |