| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 1679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1690 } | 1690 } |
| 1691 | 1691 |
| 1692 void LayerTreeHostImpl::DidDrawAllLayers(const FrameData& frame) { | 1692 void LayerTreeHostImpl::DidDrawAllLayers(const FrameData& frame) { |
| 1693 for (size_t i = 0; i < frame.will_draw_layers.size(); ++i) | 1693 for (size_t i = 0; i < frame.will_draw_layers.size(); ++i) |
| 1694 frame.will_draw_layers[i]->DidDraw(resource_provider_.get()); | 1694 frame.will_draw_layers[i]->DidDraw(resource_provider_.get()); |
| 1695 | 1695 |
| 1696 for (auto* it : video_frame_controllers_) | 1696 for (auto* it : video_frame_controllers_) |
| 1697 it->DidDrawFrame(); | 1697 it->DidDrawFrame(); |
| 1698 } | 1698 } |
| 1699 | 1699 |
| 1700 void LayerTreeHostImpl::FinishAllRendering() { | |
| 1701 if (renderer_) | |
| 1702 renderer_->Finish(); | |
| 1703 } | |
| 1704 | |
| 1705 int LayerTreeHostImpl::RequestedMSAASampleCount() const { | 1700 int LayerTreeHostImpl::RequestedMSAASampleCount() const { |
| 1706 if (settings_.gpu_rasterization_msaa_sample_count == -1) { | 1701 if (settings_.gpu_rasterization_msaa_sample_count == -1) { |
| 1707 // Use the most up-to-date version of device_scale_factor that we have. | 1702 // Use the most up-to-date version of device_scale_factor that we have. |
| 1708 float device_scale_factor = pending_tree_ | 1703 float device_scale_factor = pending_tree_ |
| 1709 ? pending_tree_->device_scale_factor() | 1704 ? pending_tree_->device_scale_factor() |
| 1710 : active_tree_->device_scale_factor(); | 1705 : active_tree_->device_scale_factor(); |
| 1711 return device_scale_factor >= 2.0f ? 4 : 8; | 1706 return device_scale_factor >= 2.0f ? 4 : 8; |
| 1712 } | 1707 } |
| 1713 | 1708 |
| 1714 return settings_.gpu_rasterization_msaa_sample_count; | 1709 return settings_.gpu_rasterization_msaa_sample_count; |
| (...skipping 2311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4026 return task_runner_provider_->HasImplThread(); | 4021 return task_runner_provider_->HasImplThread(); |
| 4027 } | 4022 } |
| 4028 | 4023 |
| 4029 bool LayerTreeHostImpl::CommitToActiveTree() const { | 4024 bool LayerTreeHostImpl::CommitToActiveTree() const { |
| 4030 // In single threaded mode we skip the pending tree and commit directly to the | 4025 // In single threaded mode we skip the pending tree and commit directly to the |
| 4031 // active tree. | 4026 // active tree. |
| 4032 return !task_runner_provider_->HasImplThread(); | 4027 return !task_runner_provider_->HasImplThread(); |
| 4033 } | 4028 } |
| 4034 | 4029 |
| 4035 } // namespace cc | 4030 } // namespace cc |
| OLD | NEW |