Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 180243014: Revert "Revert 253606 "Revert 251238 "cc: Clean up iterator template to ..."" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/trees/layer_tree_host_common.cc ('k') | cc/trees/layer_tree_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 755
756 if (debug_state_.show_occluding_rects) { 756 if (debug_state_.show_occluding_rects) {
757 occlusion_tracker.set_occluding_screen_space_rects_container( 757 occlusion_tracker.set_occluding_screen_space_rects_container(
758 &frame->occluding_screen_space_rects); 758 &frame->occluding_screen_space_rects);
759 } 759 }
760 if (debug_state_.show_non_occluding_rects) { 760 if (debug_state_.show_non_occluding_rects) {
761 occlusion_tracker.set_non_occluding_screen_space_rects_container( 761 occlusion_tracker.set_non_occluding_screen_space_rects_container(
762 &frame->non_occluding_screen_space_rects); 762 &frame->non_occluding_screen_space_rects);
763 } 763 }
764 764
765 // Add quads to the Render passes in front-to-back order to allow for testing 765 // Add quads to the Render passes in FrontToBack order to allow for testing
766 // occlusion and performing culling during the tree walk. 766 // occlusion and performing culling during the tree walk.
767 typedef LayerIterator<LayerImpl> LayerIteratorType; 767 typedef LayerIterator<LayerImpl,
768 LayerImplList,
769 RenderSurfaceImpl,
770 LayerIteratorActions::FrontToBack> LayerIteratorType;
768 771
769 // Typically when we are missing a texture and use a checkerboard quad, we 772 // Typically when we are missing a texture and use a checkerboard quad, we
770 // still draw the frame. However when the layer being checkerboarded is moving 773 // still draw the frame. However when the layer being checkerboarded is moving
771 // due to an impl-animation, we drop the frame to avoid flashing due to the 774 // due to an impl-animation, we drop the frame to avoid flashing due to the
772 // texture suddenly appearing in the future. 775 // texture suddenly appearing in the future.
773 DrawSwapReadbackResult::DrawResult draw_result = 776 DrawSwapReadbackResult::DrawResult draw_result =
774 DrawSwapReadbackResult::DRAW_SUCCESS; 777 DrawSwapReadbackResult::DRAW_SUCCESS;
775 // When we have a copy request for a layer, we need to draw no matter 778 // When we have a copy request for a layer, we need to draw no matter
776 // what, as the layer may disappear after this frame. 779 // what, as the layer may disappear after this frame.
777 bool have_copy_request = false; 780 bool have_copy_request = false;
(...skipping 2217 matching lines...) Expand 10 before | Expand all | Expand 10 after
2995 swap_promise_monitor_.erase(monitor); 2998 swap_promise_monitor_.erase(monitor);
2996 } 2999 }
2997 3000
2998 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { 3001 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() {
2999 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); 3002 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin();
3000 for (; it != swap_promise_monitor_.end(); it++) 3003 for (; it != swap_promise_monitor_.end(); it++)
3001 (*it)->OnSetNeedsRedrawOnImpl(); 3004 (*it)->OnSetNeedsRedrawOnImpl();
3002 } 3005 }
3003 3006
3004 } // namespace cc 3007 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_common.cc ('k') | cc/trees/layer_tree_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698