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 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
632 if (occlusion_tracker.Occluded( | 632 if (occlusion_tracker.Occluded( |
633 it->render_target(), | 633 it->render_target(), |
634 it->visible_content_rect(), | 634 it->visible_content_rect(), |
635 it->draw_transform(), | 635 it->draw_transform(), |
636 impl_draw_transform_is_unknown, | 636 impl_draw_transform_is_unknown, |
637 it->is_clipped(), | 637 it->is_clipped(), |
638 it->clip_rect(), | 638 it->clip_rect(), |
639 &has_occlusion_from_outside_target_surface)) { | 639 &has_occlusion_from_outside_target_surface)) { |
640 append_quads_data.had_occlusion_from_outside_target_surface |= | 640 append_quads_data.had_occlusion_from_outside_target_surface |= |
641 has_occlusion_from_outside_target_surface; | 641 has_occlusion_from_outside_target_surface; |
642 } else { | 642 } else if (!output_surface_->ForcedDrawToSoftwareDevice() || |
aelias_OOO_until_Jul13
2013/05/29 22:30:47
Seems like an arbitrary place to bail out... I sug
boliu
2013/05/30 00:01:28
Went with option 2 stead, skip the whole loop body
| |
643 it->CanDrawInTilelessSoftwareMode()) { | |
643 DCHECK_EQ(active_tree_, it->layer_tree_impl()); | 644 DCHECK_EQ(active_tree_, it->layer_tree_impl()); |
645 | |
644 it->WillDraw(resource_provider_.get()); | 646 it->WillDraw(resource_provider_.get()); |
645 frame->will_draw_layers.push_back(*it); | 647 frame->will_draw_layers.push_back(*it); |
646 | 648 |
647 if (it->HasContributingDelegatedRenderPasses()) { | 649 if (it->HasContributingDelegatedRenderPasses()) { |
648 RenderPass::Id contributing_render_pass_id = | 650 RenderPass::Id contributing_render_pass_id = |
649 it->FirstContributingRenderPassId(); | 651 it->FirstContributingRenderPassId(); |
650 while (frame->render_passes_by_id.find(contributing_render_pass_id) != | 652 while (frame->render_passes_by_id.find(contributing_render_pass_id) != |
651 frame->render_passes_by_id.end()) { | 653 frame->render_passes_by_id.end()) { |
652 RenderPass* render_pass = | 654 RenderPass* render_pass = |
653 frame->render_passes_by_id[contributing_render_pass_id]; | 655 frame->render_passes_by_id[contributing_render_pass_id]; |
(...skipping 1588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2242 } | 2244 } |
2243 | 2245 |
2244 void LayerTreeHostImpl::SetDebugState(const LayerTreeDebugState& debug_state) { | 2246 void LayerTreeHostImpl::SetDebugState(const LayerTreeDebugState& debug_state) { |
2245 if (debug_state_.continuous_painting != debug_state.continuous_painting) | 2247 if (debug_state_.continuous_painting != debug_state.continuous_painting) |
2246 paint_time_counter_->ClearHistory(); | 2248 paint_time_counter_->ClearHistory(); |
2247 | 2249 |
2248 debug_state_ = debug_state; | 2250 debug_state_ = debug_state; |
2249 } | 2251 } |
2250 | 2252 |
2251 } // namespace cc | 2253 } // namespace cc |
OLD | NEW |