| 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 750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 761 contributing_render_pass, | 761 contributing_render_pass, |
| 762 occlusion_tracker, | 762 occlusion_tracker, |
| 763 &append_quads_data); | 763 &append_quads_data); |
| 764 } else if (it.represents_itself() && | 764 } else if (it.represents_itself() && |
| 765 !it->visible_content_rect().IsEmpty()) { | 765 !it->visible_content_rect().IsEmpty()) { |
| 766 bool impl_draw_transform_is_unknown = false; | 766 bool impl_draw_transform_is_unknown = false; |
| 767 bool occluded = occlusion_tracker.Occluded( | 767 bool occluded = occlusion_tracker.Occluded( |
| 768 it->render_target(), | 768 it->render_target(), |
| 769 it->visible_content_rect(), | 769 it->visible_content_rect(), |
| 770 it->draw_transform(), | 770 it->draw_transform(), |
| 771 impl_draw_transform_is_unknown, | 771 impl_draw_transform_is_unknown); |
| 772 it->is_clipped(), | |
| 773 it->clip_rect()); | |
| 774 if (!occluded && it->WillDraw(draw_mode, resource_provider_.get())) { | 772 if (!occluded && it->WillDraw(draw_mode, resource_provider_.get())) { |
| 775 DCHECK_EQ(active_tree_, it->layer_tree_impl()); | 773 DCHECK_EQ(active_tree_, it->layer_tree_impl()); |
| 776 | 774 |
| 777 frame->will_draw_layers.push_back(*it); | 775 frame->will_draw_layers.push_back(*it); |
| 778 | 776 |
| 779 if (it->HasContributingDelegatedRenderPasses()) { | 777 if (it->HasContributingDelegatedRenderPasses()) { |
| 780 RenderPass::Id contributing_render_pass_id = | 778 RenderPass::Id contributing_render_pass_id = |
| 781 it->FirstContributingRenderPassId(); | 779 it->FirstContributingRenderPassId(); |
| 782 while (frame->render_passes_by_id.find(contributing_render_pass_id) != | 780 while (frame->render_passes_by_id.find(contributing_render_pass_id) != |
| 783 frame->render_passes_by_id.end()) { | 781 frame->render_passes_by_id.end()) { |
| (...skipping 2014 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2798 std::set<UIResourceId>::iterator found_in_evicted = | 2796 std::set<UIResourceId>::iterator found_in_evicted = |
| 2799 evicted_ui_resources_.find(uid); | 2797 evicted_ui_resources_.find(uid); |
| 2800 if (found_in_evicted == evicted_ui_resources_.end()) | 2798 if (found_in_evicted == evicted_ui_resources_.end()) |
| 2801 return; | 2799 return; |
| 2802 evicted_ui_resources_.erase(found_in_evicted); | 2800 evicted_ui_resources_.erase(found_in_evicted); |
| 2803 if (evicted_ui_resources_.empty()) | 2801 if (evicted_ui_resources_.empty()) |
| 2804 client_->OnCanDrawStateChanged(CanDraw()); | 2802 client_->OnCanDrawStateChanged(CanDraw()); |
| 2805 } | 2803 } |
| 2806 | 2804 |
| 2807 } // namespace cc | 2805 } // namespace cc |
| OLD | NEW |