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 #include <limits> | 8 #include <limits> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
796 ++it) { | 796 ++it) { |
797 RenderPass::Id target_render_pass_id = | 797 RenderPass::Id target_render_pass_id = |
798 it.target_render_surface_layer()->render_surface()->RenderPassId(); | 798 it.target_render_surface_layer()->render_surface()->RenderPassId(); |
799 RenderPass* target_render_pass = | 799 RenderPass* target_render_pass = |
800 frame->render_passes_by_id[target_render_pass_id]; | 800 frame->render_passes_by_id[target_render_pass_id]; |
801 | 801 |
802 occlusion_tracker.EnterLayer(it); | 802 occlusion_tracker.EnterLayer(it); |
803 | 803 |
804 AppendQuadsData append_quads_data(target_render_pass_id); | 804 AppendQuadsData append_quads_data(target_render_pass_id); |
805 | 805 |
| 806 DCHECK(it->transform_is_invertible()) << "Layer should not have been added" |
| 807 << " to surface"; |
806 if (it.represents_target_render_surface()) { | 808 if (it.represents_target_render_surface()) { |
807 if (it->HasCopyRequest()) { | 809 if (it->HasCopyRequest()) { |
808 have_copy_request = true; | 810 have_copy_request = true; |
809 it->TakeCopyRequestsAndTransformToTarget( | 811 it->TakeCopyRequestsAndTransformToTarget( |
810 &target_render_pass->copy_requests); | 812 &target_render_pass->copy_requests); |
811 } | 813 } |
812 } else if (it.represents_contributing_render_surface() && | 814 } else if (it.represents_contributing_render_surface() && |
813 it->render_surface()->contributes_to_drawn_surface()) { | 815 it->render_surface()->contributes_to_drawn_surface()) { |
814 RenderPass::Id contributing_render_pass_id = | 816 RenderPass::Id contributing_render_pass_id = |
815 it->render_surface()->RenderPassId(); | 817 it->render_surface()->RenderPassId(); |
(...skipping 2203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3019 swap_promise_monitor_.erase(monitor); | 3021 swap_promise_monitor_.erase(monitor); |
3020 } | 3022 } |
3021 | 3023 |
3022 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { | 3024 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { |
3023 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); | 3025 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); |
3024 for (; it != swap_promise_monitor_.end(); it++) | 3026 for (; it != swap_promise_monitor_.end(); it++) |
3025 (*it)->OnSetNeedsRedrawOnImpl(); | 3027 (*it)->OnSetNeedsRedrawOnImpl(); |
3026 } | 3028 } |
3027 | 3029 |
3028 } // namespace cc | 3030 } // namespace cc |
OLD | NEW |