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

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

Issue 24280009: Move tile-free-software render surface disabling to UpdateDrawProperties. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 2 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_unittest.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 841 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 active_tree_->background_color(), 852 active_tree_->background_color(),
853 occlusion_tracker); 853 occlusion_tracker);
854 } 854 }
855 855
856 if (draw_frame) 856 if (draw_frame)
857 occlusion_tracker.overdraw_metrics()->RecordMetrics(this); 857 occlusion_tracker.overdraw_metrics()->RecordMetrics(this);
858 else 858 else
859 DCHECK(!have_copy_request); 859 DCHECK(!have_copy_request);
860 860
861 RemoveRenderPasses(CullRenderPassesWithNoQuads(), frame); 861 RemoveRenderPasses(CullRenderPassesWithNoQuads(), frame);
862 if (!output_surface_->ForcedDrawToSoftwareDevice()) 862 renderer_->DecideRenderPassAllocationsForFrame(frame->render_passes);
863 renderer_->DecideRenderPassAllocationsForFrame(frame->render_passes);
864 RemoveRenderPasses(CullRenderPassesWithCachedTextures(renderer_.get()), 863 RemoveRenderPasses(CullRenderPassesWithCachedTextures(renderer_.get()),
865 frame); 864 frame);
866 865
867 // Any copy requests left in the tree are not going to get serviced, and 866 // Any copy requests left in the tree are not going to get serviced, and
868 // should be aborted. 867 // should be aborted.
869 ScopedPtrVector<CopyOutputRequest> requests_to_abort; 868 ScopedPtrVector<CopyOutputRequest> requests_to_abort;
870 while (!active_tree_->LayersWithCopyOutputRequest().empty()) { 869 while (!active_tree_->LayersWithCopyOutputRequest().empty()) {
871 LayerImpl* layer = active_tree_->LayersWithCopyOutputRequest().back(); 870 LayerImpl* layer = active_tree_->LayersWithCopyOutputRequest().back();
872 layer->TakeCopyRequestsAndTransformToTarget(&requests_to_abort); 871 layer->TakeCopyRequestsAndTransformToTarget(&requests_to_abort);
873 } 872 }
874 for (size_t i = 0; i < requests_to_abort.size(); ++i) 873 for (size_t i = 0; i < requests_to_abort.size(); ++i)
875 requests_to_abort[i]->SendEmptyResult(); 874 requests_to_abort[i]->SendEmptyResult();
876 875
877 // If we're making a frame to draw, it better have at least one render pass. 876 // If we're making a frame to draw, it better have at least one render pass.
878 DCHECK(!frame->render_passes.empty()); 877 DCHECK(!frame->render_passes.empty());
878
879 // Should only have one render pass in resourceless software mode.
880 if (output_surface_->ForcedDrawToSoftwareDevice())
881 DCHECK_EQ(1u, frame->render_passes.size());
882
879 return draw_frame; 883 return draw_frame;
880 } 884 }
881 885
882 void LayerTreeHostImpl::MainThreadHasStoppedFlinging() { 886 void LayerTreeHostImpl::MainThreadHasStoppedFlinging() {
883 if (input_handler_client_) 887 if (input_handler_client_)
884 input_handler_client_->MainThreadHasStoppedFlinging(); 888 input_handler_client_->MainThreadHasStoppedFlinging();
885 } 889 }
886 890
887 void LayerTreeHostImpl::UpdateBackgroundAnimateTicking( 891 void LayerTreeHostImpl::UpdateBackgroundAnimateTicking(
888 bool should_background_tick) { 892 bool should_background_tick) {
(...skipping 1894 matching lines...) Expand 10 before | Expand all | Expand 10 after
2783 std::set<UIResourceId>::iterator found_in_evicted = 2787 std::set<UIResourceId>::iterator found_in_evicted =
2784 evicted_ui_resources_.find(uid); 2788 evicted_ui_resources_.find(uid);
2785 if (found_in_evicted == evicted_ui_resources_.end()) 2789 if (found_in_evicted == evicted_ui_resources_.end())
2786 return; 2790 return;
2787 evicted_ui_resources_.erase(found_in_evicted); 2791 evicted_ui_resources_.erase(found_in_evicted);
2788 if (evicted_ui_resources_.empty()) 2792 if (evicted_ui_resources_.empty())
2789 client_->OnCanDrawStateChanged(CanDraw()); 2793 client_->OnCanDrawStateChanged(CanDraw());
2790 } 2794 }
2791 2795
2792 } // namespace cc 2796 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_common_unittest.cc ('k') | cc/trees/layer_tree_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698