| 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 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 809 it->render_surface()->RenderPassId(); | 809 it->render_surface()->RenderPassId(); |
| 810 RenderPass* contributing_render_pass = | 810 RenderPass* contributing_render_pass = |
| 811 frame->render_passes_by_id[contributing_render_pass_id]; | 811 frame->render_passes_by_id[contributing_render_pass_id]; |
| 812 AppendQuadsForRenderSurfaceLayer(target_render_pass, | 812 AppendQuadsForRenderSurfaceLayer(target_render_pass, |
| 813 *it, | 813 *it, |
| 814 contributing_render_pass, | 814 contributing_render_pass, |
| 815 occlusion_tracker, | 815 occlusion_tracker, |
| 816 &append_quads_data); | 816 &append_quads_data); |
| 817 } else if (it.represents_itself() && it->DrawsContent() && | 817 } else if (it.represents_itself() && it->DrawsContent() && |
| 818 !it->visible_content_rect().IsEmpty()) { | 818 !it->visible_content_rect().IsEmpty()) { |
| 819 bool impl_draw_transform_is_unknown = false; | 819 bool occluded = occlusion_tracker.Occluded(it->render_target(), |
| 820 bool occluded = occlusion_tracker.Occluded( | 820 it->visible_content_rect(), |
| 821 it->render_target(), | 821 it->draw_transform()); |
| 822 it->visible_content_rect(), | |
| 823 it->draw_transform(), | |
| 824 impl_draw_transform_is_unknown); | |
| 825 if (!occluded && it->WillDraw(draw_mode, resource_provider_.get())) { | 822 if (!occluded && it->WillDraw(draw_mode, resource_provider_.get())) { |
| 826 DCHECK_EQ(active_tree_, it->layer_tree_impl()); | 823 DCHECK_EQ(active_tree_, it->layer_tree_impl()); |
| 827 | 824 |
| 828 frame->will_draw_layers.push_back(*it); | 825 frame->will_draw_layers.push_back(*it); |
| 829 | 826 |
| 830 if (it->HasContributingDelegatedRenderPasses()) { | 827 if (it->HasContributingDelegatedRenderPasses()) { |
| 831 RenderPass::Id contributing_render_pass_id = | 828 RenderPass::Id contributing_render_pass_id = |
| 832 it->FirstContributingRenderPassId(); | 829 it->FirstContributingRenderPassId(); |
| 833 while (frame->render_passes_by_id.find(contributing_render_pass_id) != | 830 while (frame->render_passes_by_id.find(contributing_render_pass_id) != |
| 834 frame->render_passes_by_id.end()) { | 831 frame->render_passes_by_id.end()) { |
| (...skipping 2190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3025 swap_promise_monitor_.erase(monitor); | 3022 swap_promise_monitor_.erase(monitor); |
| 3026 } | 3023 } |
| 3027 | 3024 |
| 3028 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { | 3025 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { |
| 3029 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); | 3026 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); |
| 3030 for (; it != swap_promise_monitor_.end(); it++) | 3027 for (; it != swap_promise_monitor_.end(); it++) |
| 3031 (*it)->OnSetNeedsRedrawOnImpl(); | 3028 (*it)->OnSetNeedsRedrawOnImpl(); |
| 3032 } | 3029 } |
| 3033 | 3030 |
| 3034 } // namespace cc | 3031 } // namespace cc |
| OLD | NEW |