| 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 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 1578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1589 rendering_stats_instrumentation_->impl_thread_rendering_stats()); | 1589 rendering_stats_instrumentation_->impl_thread_rendering_stats()); |
| 1590 rendering_stats_instrumentation_->AccumulateAndClearImplThreadStats(); | 1590 rendering_stats_instrumentation_->AccumulateAndClearImplThreadStats(); |
| 1591 } | 1591 } |
| 1592 | 1592 |
| 1593 void LayerTreeHostImpl::DidDrawAllLayers(const FrameData& frame) { | 1593 void LayerTreeHostImpl::DidDrawAllLayers(const FrameData& frame) { |
| 1594 for (size_t i = 0; i < frame.will_draw_layers.size(); ++i) | 1594 for (size_t i = 0; i < frame.will_draw_layers.size(); ++i) |
| 1595 frame.will_draw_layers[i]->DidDraw(resource_provider_.get()); | 1595 frame.will_draw_layers[i]->DidDraw(resource_provider_.get()); |
| 1596 | 1596 |
| 1597 for (auto& it : video_frame_controllers_) | 1597 for (auto& it : video_frame_controllers_) |
| 1598 it->DidDrawFrame(); | 1598 it->DidDrawFrame(); |
| 1599 | |
| 1600 // Once all layers have been drawn, pending texture uploads should no | |
| 1601 // longer block future uploads. | |
| 1602 resource_provider_->MarkPendingUploadsAsNonBlocking(); | |
| 1603 } | 1599 } |
| 1604 | 1600 |
| 1605 void LayerTreeHostImpl::FinishAllRendering() { | 1601 void LayerTreeHostImpl::FinishAllRendering() { |
| 1606 if (renderer_) | 1602 if (renderer_) |
| 1607 renderer_->Finish(); | 1603 renderer_->Finish(); |
| 1608 } | 1604 } |
| 1609 | 1605 |
| 1610 bool LayerTreeHostImpl::CanUseGpuRasterization() { | 1606 bool LayerTreeHostImpl::CanUseGpuRasterization() { |
| 1611 if (!(output_surface_ && output_surface_->context_provider() && | 1607 if (!(output_surface_ && output_surface_->context_provider() && |
| 1612 output_surface_->worker_context_provider())) | 1608 output_surface_->worker_context_provider())) |
| (...skipping 1849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3462 new_target.SetToMin(layer_impl->MaxScrollOffset()); | 3458 new_target.SetToMin(layer_impl->MaxScrollOffset()); |
| 3463 | 3459 |
| 3464 curve->UpdateTarget( | 3460 curve->UpdateTarget( |
| 3465 animation->TrimTimeToCurrentIteration(CurrentBeginFrameArgs().frame_time) | 3461 animation->TrimTimeToCurrentIteration(CurrentBeginFrameArgs().frame_time) |
| 3466 .InSecondsF(), | 3462 .InSecondsF(), |
| 3467 new_target); | 3463 new_target); |
| 3468 | 3464 |
| 3469 return true; | 3465 return true; |
| 3470 } | 3466 } |
| 3471 } // namespace cc | 3467 } // namespace cc |
| OLD | NEW |