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 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
596 LayerIteratorType::End(frame->render_surface_layer_list); | 596 LayerIteratorType::End(frame->render_surface_layer_list); |
597 for (LayerIteratorType it = | 597 for (LayerIteratorType it = |
598 LayerIteratorType::Begin(frame->render_surface_layer_list); | 598 LayerIteratorType::Begin(frame->render_surface_layer_list); |
599 it != end; | 599 it != end; |
600 ++it) { | 600 ++it) { |
601 RenderPass::Id target_render_pass_id = | 601 RenderPass::Id target_render_pass_id = |
602 it.target_render_surface_layer()->render_surface()->RenderPassId(); | 602 it.target_render_surface_layer()->render_surface()->RenderPassId(); |
603 RenderPass* target_render_pass = | 603 RenderPass* target_render_pass = |
604 frame->render_passes_by_id[target_render_pass_id]; | 604 frame->render_passes_by_id[target_render_pass_id]; |
605 | 605 |
606 bool prevent_occlusion = | 606 bool prevent_occlusion = it.target_render_surface_layer()->HasCopyRequest(); |
607 it.target_render_surface_layer()->HasRequestCopyCallback(); | |
608 occlusion_tracker.EnterLayer(it, prevent_occlusion); | 607 occlusion_tracker.EnterLayer(it, prevent_occlusion); |
609 | 608 |
610 AppendQuadsData append_quads_data(target_render_pass->id); | 609 AppendQuadsData append_quads_data(target_render_pass->id); |
611 if (output_surface_->ForcedDrawToSoftwareDevice()) | 610 if (output_surface_->ForcedDrawToSoftwareDevice()) |
612 append_quads_data.allow_tile_draw_quads = false; | 611 append_quads_data.allow_tile_draw_quads = false; |
613 | 612 |
614 if (it.represents_target_render_surface()) { | 613 if (it.represents_target_render_surface()) { |
615 if (it->HasRequestCopyCallback()) { | 614 if (it->HasCopyRequest()) { |
616 have_copy_request = true; | 615 have_copy_request = true; |
617 it->TakeRequestCopyCallbacks(&target_render_pass->copy_callbacks); | 616 it->TakeCopyRequests(&target_render_pass->copy_requests); |
618 } | 617 } |
619 } else if (it.represents_contributing_render_surface()) { | 618 } else if (it.represents_contributing_render_surface()) { |
620 RenderPass::Id contributing_render_pass_id = | 619 RenderPass::Id contributing_render_pass_id = |
621 it->render_surface()->RenderPassId(); | 620 it->render_surface()->RenderPassId(); |
622 RenderPass* contributing_render_pass = | 621 RenderPass* contributing_render_pass = |
623 frame->render_passes_by_id[contributing_render_pass_id]; | 622 frame->render_passes_by_id[contributing_render_pass_id]; |
624 AppendQuadsForRenderSurfaceLayer(target_render_pass, | 623 AppendQuadsForRenderSurfaceLayer(target_render_pass, |
625 *it, | 624 *it, |
626 contributing_render_pass, | 625 contributing_render_pass, |
627 occlusion_tracker, | 626 occlusion_tracker, |
(...skipping 1606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2234 } | 2233 } |
2235 | 2234 |
2236 void LayerTreeHostImpl::SetDebugState(const LayerTreeDebugState& debug_state) { | 2235 void LayerTreeHostImpl::SetDebugState(const LayerTreeDebugState& debug_state) { |
2237 if (debug_state_.continuous_painting != debug_state.continuous_painting) | 2236 if (debug_state_.continuous_painting != debug_state.continuous_painting) |
2238 paint_time_counter_->ClearHistory(); | 2237 paint_time_counter_->ClearHistory(); |
2239 | 2238 |
2240 debug_state_ = debug_state; | 2239 debug_state_ = debug_state; |
2241 } | 2240 } |
2242 | 2241 |
2243 } // namespace cc | 2242 } // namespace cc |
OLD | NEW |