| 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 737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 748 it->render_surface()->contributes_to_drawn_surface()) { | 748 it->render_surface()->contributes_to_drawn_surface()) { |
| 749 RenderPass::Id contributing_render_pass_id = | 749 RenderPass::Id contributing_render_pass_id = |
| 750 it->render_surface()->RenderPassId(); | 750 it->render_surface()->RenderPassId(); |
| 751 RenderPass* contributing_render_pass = | 751 RenderPass* contributing_render_pass = |
| 752 frame->render_passes_by_id[contributing_render_pass_id]; | 752 frame->render_passes_by_id[contributing_render_pass_id]; |
| 753 AppendQuadsForRenderSurfaceLayer(target_render_pass, | 753 AppendQuadsForRenderSurfaceLayer(target_render_pass, |
| 754 *it, | 754 *it, |
| 755 contributing_render_pass, | 755 contributing_render_pass, |
| 756 occlusion_tracker, | 756 occlusion_tracker, |
| 757 &append_quads_data); | 757 &append_quads_data); |
| 758 } else if (it.represents_itself() && it->DrawsContent() && | 758 } else if (it.represents_itself() && |
| 759 !it->draw_properties().skip_drawing && |
| 759 !it->visible_content_rect().IsEmpty()) { | 760 !it->visible_content_rect().IsEmpty()) { |
| 760 bool impl_draw_transform_is_unknown = false; | 761 bool impl_draw_transform_is_unknown = false; |
| 761 bool occluded = occlusion_tracker.Occluded( | 762 bool occluded = occlusion_tracker.Occluded( |
| 762 it->render_target(), | 763 it->render_target(), |
| 763 it->visible_content_rect(), | 764 it->visible_content_rect(), |
| 764 it->draw_transform(), | 765 it->draw_transform(), |
| 765 impl_draw_transform_is_unknown); | 766 impl_draw_transform_is_unknown); |
| 766 if (!occluded && it->WillDraw(draw_mode, resource_provider_.get())) { | 767 if (!occluded && it->WillDraw(draw_mode, resource_provider_.get())) { |
| 767 DCHECK_EQ(active_tree_, it->layer_tree_impl()); | 768 DCHECK_EQ(active_tree_, it->layer_tree_impl()); |
| 768 | 769 |
| (...skipping 2033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2802 std::set<UIResourceId>::iterator found_in_evicted = | 2803 std::set<UIResourceId>::iterator found_in_evicted = |
| 2803 evicted_ui_resources_.find(uid); | 2804 evicted_ui_resources_.find(uid); |
| 2804 if (found_in_evicted == evicted_ui_resources_.end()) | 2805 if (found_in_evicted == evicted_ui_resources_.end()) |
| 2805 return; | 2806 return; |
| 2806 evicted_ui_resources_.erase(found_in_evicted); | 2807 evicted_ui_resources_.erase(found_in_evicted); |
| 2807 if (evicted_ui_resources_.empty()) | 2808 if (evicted_ui_resources_.empty()) |
| 2808 client_->OnCanDrawStateChanged(CanDraw()); | 2809 client_->OnCanDrawStateChanged(CanDraw()); |
| 2809 } | 2810 } |
| 2810 | 2811 |
| 2811 } // namespace cc | 2812 } // namespace cc |
| OLD | NEW |