| 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 752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 763 | 763 |
| 764 if (debug_state_.show_occluding_rects) { | 764 if (debug_state_.show_occluding_rects) { |
| 765 occlusion_tracker.set_occluding_screen_space_rects_container( | 765 occlusion_tracker.set_occluding_screen_space_rects_container( |
| 766 &frame->occluding_screen_space_rects); | 766 &frame->occluding_screen_space_rects); |
| 767 } | 767 } |
| 768 if (debug_state_.show_non_occluding_rects) { | 768 if (debug_state_.show_non_occluding_rects) { |
| 769 occlusion_tracker.set_non_occluding_screen_space_rects_container( | 769 occlusion_tracker.set_non_occluding_screen_space_rects_container( |
| 770 &frame->non_occluding_screen_space_rects); | 770 &frame->non_occluding_screen_space_rects); |
| 771 } | 771 } |
| 772 | 772 |
| 773 // Add quads to the Render passes in FrontToBack order to allow for testing | 773 // Add quads to the Render passes in front-to-back order to allow for testing |
| 774 // occlusion and performing culling during the tree walk. | 774 // occlusion and performing culling during the tree walk. |
| 775 typedef LayerIterator<LayerImpl, | 775 typedef LayerIterator<LayerImpl> LayerIteratorType; |
| 776 LayerImplList, | |
| 777 RenderSurfaceImpl, | |
| 778 LayerIteratorActions::FrontToBack> LayerIteratorType; | |
| 779 | 776 |
| 780 // Typically when we are missing a texture and use a checkerboard quad, we | 777 // Typically when we are missing a texture and use a checkerboard quad, we |
| 781 // still draw the frame. However when the layer being checkerboarded is moving | 778 // still draw the frame. However when the layer being checkerboarded is moving |
| 782 // due to an impl-animation, we drop the frame to avoid flashing due to the | 779 // due to an impl-animation, we drop the frame to avoid flashing due to the |
| 783 // texture suddenly appearing in the future. | 780 // texture suddenly appearing in the future. |
| 784 DrawSwapReadbackResult::DrawResult draw_result = | 781 DrawSwapReadbackResult::DrawResult draw_result = |
| 785 DrawSwapReadbackResult::DRAW_SUCCESS; | 782 DrawSwapReadbackResult::DRAW_SUCCESS; |
| 786 // When we have a copy request for a layer, we need to draw no matter | 783 // When we have a copy request for a layer, we need to draw no matter |
| 787 // what, as the layer may disappear after this frame. | 784 // what, as the layer may disappear after this frame. |
| 788 bool have_copy_request = false; | 785 bool have_copy_request = false; |
| (...skipping 2198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2987 swap_promise_monitor_.erase(monitor); | 2984 swap_promise_monitor_.erase(monitor); |
| 2988 } | 2985 } |
| 2989 | 2986 |
| 2990 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { | 2987 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { |
| 2991 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); | 2988 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); |
| 2992 for (; it != swap_promise_monitor_.end(); it++) | 2989 for (; it != swap_promise_monitor_.end(); it++) |
| 2993 (*it)->OnSetNeedsRedrawOnImpl(); | 2990 (*it)->OnSetNeedsRedrawOnImpl(); |
| 2994 } | 2991 } |
| 2995 | 2992 |
| 2996 } // namespace cc | 2993 } // namespace cc |
| OLD | NEW |