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 | 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 1201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1212 for (size_t i = 0; i < frame.will_draw_layers.size(); ++i) | 1212 for (size_t i = 0; i < frame.will_draw_layers.size(); ++i) |
1213 frame.will_draw_layers[i]->DidDraw(resource_provider_.get()); | 1213 frame.will_draw_layers[i]->DidDraw(resource_provider_.get()); |
1214 | 1214 |
1215 // Once all layers have been drawn, pending texture uploads should no | 1215 // Once all layers have been drawn, pending texture uploads should no |
1216 // longer block future uploads. | 1216 // longer block future uploads. |
1217 if (resource_provider_) | 1217 if (resource_provider_) |
1218 resource_provider_->MarkPendingUploadsAsNonBlocking(); | 1218 resource_provider_->MarkPendingUploadsAsNonBlocking(); |
1219 } | 1219 } |
1220 | 1220 |
1221 void LayerTreeHostImpl::FinishAllRendering() { | 1221 void LayerTreeHostImpl::FinishAllRendering() { |
1222 if (renderer_) | 1222 // Can this be a flush? |
piman
2013/06/21 02:31:10
I believe this was needed at some point on some pl
| |
1223 renderer_->Finish(); | 1223 //if (renderer_) |
1224 // renderer_->Finish(); | |
1224 } | 1225 } |
1225 | 1226 |
1226 bool LayerTreeHostImpl::IsContextLost() { | 1227 bool LayerTreeHostImpl::IsContextLost() { |
1227 DCHECK(proxy_->IsImplThread()); | 1228 DCHECK(proxy_->IsImplThread()); |
1228 return renderer_ && renderer_->IsContextLost(); | 1229 return renderer_ && renderer_->IsContextLost(); |
1229 } | 1230 } |
1230 | 1231 |
1231 const RendererCapabilities& LayerTreeHostImpl::GetRendererCapabilities() const { | 1232 const RendererCapabilities& LayerTreeHostImpl::GetRendererCapabilities() const { |
1232 return renderer_->Capabilities(); | 1233 return renderer_->Capabilities(); |
1233 } | 1234 } |
(...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2337 } | 2338 } |
2338 | 2339 |
2339 void LayerTreeHostImpl::SetDebugState(const LayerTreeDebugState& debug_state) { | 2340 void LayerTreeHostImpl::SetDebugState(const LayerTreeDebugState& debug_state) { |
2340 if (debug_state_.continuous_painting != debug_state.continuous_painting) | 2341 if (debug_state_.continuous_painting != debug_state.continuous_painting) |
2341 paint_time_counter_->ClearHistory(); | 2342 paint_time_counter_->ClearHistory(); |
2342 | 2343 |
2343 debug_state_ = debug_state; | 2344 debug_state_ = debug_state; |
2344 } | 2345 } |
2345 | 2346 |
2346 } // namespace cc | 2347 } // namespace cc |
OLD | NEW |