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

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

Issue 17176012: Remove NULL ResourceProvider, TileManager early outs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 6 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/layers/picture_layer_impl.cc ('k') | cc/trees/thread_proxy.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 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 } 743 }
744 744
745 if (draw_frame) 745 if (draw_frame)
746 occlusion_tracker.overdraw_metrics()->RecordMetrics(this); 746 occlusion_tracker.overdraw_metrics()->RecordMetrics(this);
747 else 747 else
748 DCHECK(!have_copy_request); 748 DCHECK(!have_copy_request);
749 749
750 RemoveRenderPasses(CullRenderPassesWithNoQuads(), frame); 750 RemoveRenderPasses(CullRenderPassesWithNoQuads(), frame);
751 if (!output_surface_->ForcedDrawToSoftwareDevice()) 751 if (!output_surface_->ForcedDrawToSoftwareDevice())
752 renderer_->DecideRenderPassAllocationsForFrame(frame->render_passes); 752 renderer_->DecideRenderPassAllocationsForFrame(frame->render_passes);
753 if (renderer_) { 753 RemoveRenderPasses(CullRenderPassesWithCachedTextures(renderer_.get()),
754 RemoveRenderPasses(CullRenderPassesWithCachedTextures(renderer_.get()), 754 frame);
755 frame);
756 }
757 755
758 // If we're making a frame to draw, it better have at least one render pass. 756 // If we're making a frame to draw, it better have at least one render pass.
759 DCHECK(!frame->render_passes.empty()); 757 DCHECK(!frame->render_passes.empty());
760 return draw_frame; 758 return draw_frame;
761 } 759 }
762 760
763 void LayerTreeHostImpl::MainThreadHasStoppedFlinging() { 761 void LayerTreeHostImpl::MainThreadHasStoppedFlinging() {
764 if (input_handler_client_) 762 if (input_handler_client_)
765 input_handler_client_->MainThreadHasStoppedFlinging(); 763 input_handler_client_->MainThreadHasStoppedFlinging();
766 } 764 }
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
1214 } 1212 }
1215 active_tree_->root_layer()->ResetAllChangeTrackingForSubtree(); 1213 active_tree_->root_layer()->ResetAllChangeTrackingForSubtree();
1216 } 1214 }
1217 1215
1218 void LayerTreeHostImpl::DidDrawAllLayers(const FrameData& frame) { 1216 void LayerTreeHostImpl::DidDrawAllLayers(const FrameData& frame) {
1219 for (size_t i = 0; i < frame.will_draw_layers.size(); ++i) 1217 for (size_t i = 0; i < frame.will_draw_layers.size(); ++i)
1220 frame.will_draw_layers[i]->DidDraw(resource_provider_.get()); 1218 frame.will_draw_layers[i]->DidDraw(resource_provider_.get());
1221 1219
1222 // Once all layers have been drawn, pending texture uploads should no 1220 // Once all layers have been drawn, pending texture uploads should no
1223 // longer block future uploads. 1221 // longer block future uploads.
1224 if (resource_provider_) 1222 resource_provider_->MarkPendingUploadsAsNonBlocking();
1225 resource_provider_->MarkPendingUploadsAsNonBlocking();
1226 } 1223 }
1227 1224
1228 void LayerTreeHostImpl::FinishAllRendering() { 1225 void LayerTreeHostImpl::FinishAllRendering() {
1229 if (renderer_) 1226 if (renderer_)
1230 renderer_->Finish(); 1227 renderer_->Finish();
1231 } 1228 }
1232 1229
1233 bool LayerTreeHostImpl::IsContextLost() { 1230 bool LayerTreeHostImpl::IsContextLost() {
1234 DCHECK(proxy_->IsImplThread()); 1231 DCHECK(proxy_->IsImplThread());
1235 return renderer_ && renderer_->IsContextLost(); 1232 return renderer_ && renderer_->IsContextLost();
(...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after
2366 } 2363 }
2367 2364
2368 void LayerTreeHostImpl::SetDebugState(const LayerTreeDebugState& debug_state) { 2365 void LayerTreeHostImpl::SetDebugState(const LayerTreeDebugState& debug_state) {
2369 if (debug_state_.continuous_painting != debug_state.continuous_painting) 2366 if (debug_state_.continuous_painting != debug_state.continuous_painting)
2370 paint_time_counter_->ClearHistory(); 2367 paint_time_counter_->ClearHistory();
2371 2368
2372 debug_state_ = debug_state; 2369 debug_state_ = debug_state;
2373 } 2370 }
2374 2371
2375 } // namespace cc 2372 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl.cc ('k') | cc/trees/thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698