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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 if (!root_layer()) | 309 if (!root_layer()) |
310 return; | 310 return; |
311 | 311 |
312 { | 312 { |
313 TRACE_EVENT2("cc", | 313 TRACE_EVENT2("cc", |
314 "LayerTreeImpl::UpdateDrawProperties", | 314 "LayerTreeImpl::UpdateDrawProperties", |
315 "IsActive", | 315 "IsActive", |
316 IsActiveTree(), | 316 IsActiveTree(), |
317 "SourceFrameNumber", | 317 "SourceFrameNumber", |
318 source_frame_number_); | 318 source_frame_number_); |
| 319 bool can_render_to_separate_surface = |
| 320 !output_surface()->ForcedDrawToSoftwareDevice(); |
319 LayerTreeHostCommon::CalcDrawPropsImplInputs inputs( | 321 LayerTreeHostCommon::CalcDrawPropsImplInputs inputs( |
320 root_layer(), | 322 root_layer(), |
321 DrawViewportSize(), | 323 DrawViewportSize(), |
322 layer_tree_host_impl_->DrawTransform(), | 324 layer_tree_host_impl_->DrawTransform(), |
323 device_scale_factor(), | 325 device_scale_factor(), |
324 total_page_scale_factor(), | 326 total_page_scale_factor(), |
325 root_scroll_layer_ ? root_scroll_layer_->parent() : NULL, | 327 root_scroll_layer_ ? root_scroll_layer_->parent() : NULL, |
326 MaxTextureSize(), | 328 MaxTextureSize(), |
327 settings().can_use_lcd_text, | 329 settings().can_use_lcd_text, |
| 330 can_render_to_separate_surface, |
328 settings().layer_transforms_should_scale_layer_contents, | 331 settings().layer_transforms_should_scale_layer_contents, |
329 &render_surface_layer_list_); | 332 &render_surface_layer_list_); |
330 LayerTreeHostCommon::CalculateDrawProperties(&inputs); | 333 LayerTreeHostCommon::CalculateDrawProperties(&inputs); |
331 } | 334 } |
332 | 335 |
333 DCHECK(!needs_update_draw_properties_) << | 336 DCHECK(!needs_update_draw_properties_) << |
334 "CalcDrawProperties should not set_needs_update_draw_properties()"; | 337 "CalcDrawProperties should not set_needs_update_draw_properties()"; |
335 } | 338 } |
336 | 339 |
337 const LayerImplList& LayerTreeImpl::RenderSurfaceLayerList() const { | 340 const LayerImplList& LayerTreeImpl::RenderSurfaceLayerList() const { |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
667 const std::vector<LayerImpl*> LayerTreeImpl::LayersWithCopyOutputRequest() | 670 const std::vector<LayerImpl*> LayerTreeImpl::LayersWithCopyOutputRequest() |
668 const { | 671 const { |
669 // Only the active tree needs to know about layers with copy requests, as | 672 // Only the active tree needs to know about layers with copy requests, as |
670 // they are aborted if not serviced during draw. | 673 // they are aborted if not serviced during draw. |
671 DCHECK(IsActiveTree()); | 674 DCHECK(IsActiveTree()); |
672 | 675 |
673 return layers_with_copy_output_request_; | 676 return layers_with_copy_output_request_; |
674 } | 677 } |
675 | 678 |
676 } // namespace cc | 679 } // namespace cc |
OLD | NEW |