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 1668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1679 // performing a resourceless software draw. Otherwise, we will attempt to | 1679 // performing a resourceless software draw. Otherwise, we will attempt to |
1680 // use the GPU ImageDecodeController during software raster. | 1680 // use the GPU ImageDecodeController during software raster. |
1681 bool use_image_hijack_canvas = !use_gpu_rasterization_; | 1681 bool use_image_hijack_canvas = !use_gpu_rasterization_; |
1682 | 1682 |
1683 std::unique_ptr<SoftwareRenderer> temp_software_renderer = | 1683 std::unique_ptr<SoftwareRenderer> temp_software_renderer = |
1684 SoftwareRenderer::Create(this, &settings_.renderer_settings, | 1684 SoftwareRenderer::Create(this, &settings_.renderer_settings, |
1685 output_surface_, nullptr, | 1685 output_surface_, nullptr, |
1686 use_image_hijack_canvas); | 1686 use_image_hijack_canvas); |
1687 temp_software_renderer->DrawFrame( | 1687 temp_software_renderer->DrawFrame( |
1688 &frame->render_passes, active_tree_->device_scale_factor(), | 1688 &frame->render_passes, active_tree_->device_scale_factor(), |
1689 DeviceViewport(), DeviceClip(), disable_picture_quad_image_filtering); | 1689 gfx::ColorSpace(), DeviceViewport(), DeviceClip(), |
| 1690 disable_picture_quad_image_filtering); |
1690 } else { | 1691 } else { |
1691 renderer_->DrawFrame(&frame->render_passes, | 1692 renderer_->DrawFrame(&frame->render_passes, |
1692 active_tree_->device_scale_factor(), DeviceViewport(), | 1693 active_tree_->device_scale_factor(), gfx::ColorSpace(), |
1693 DeviceClip(), false); | 1694 DeviceViewport(), DeviceClip(), false); |
1694 } | 1695 } |
1695 // The render passes should be consumed by the renderer. | 1696 // The render passes should be consumed by the renderer. |
1696 DCHECK(frame->render_passes.empty()); | 1697 DCHECK(frame->render_passes.empty()); |
1697 | 1698 |
1698 // The next frame should start by assuming nothing has changed, and changes | 1699 // The next frame should start by assuming nothing has changed, and changes |
1699 // are noted as they occur. | 1700 // are noted as they occur. |
1700 // TODO(boliu): If we did a temporary software renderer frame, propogate the | 1701 // TODO(boliu): If we did a temporary software renderer frame, propogate the |
1701 // damage forward to the next frame. | 1702 // damage forward to the next frame. |
1702 for (size_t i = 0; i < frame->render_surface_layer_list->size(); i++) { | 1703 for (size_t i = 0; i < frame->render_surface_layer_list->size(); i++) { |
1703 (*frame->render_surface_layer_list)[i]->render_surface()->damage_tracker()-> | 1704 (*frame->render_surface_layer_list)[i]->render_surface()->damage_tracker()-> |
(...skipping 2313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4017 return task_runner_provider_->HasImplThread(); | 4018 return task_runner_provider_->HasImplThread(); |
4018 } | 4019 } |
4019 | 4020 |
4020 bool LayerTreeHostImpl::CommitToActiveTree() const { | 4021 bool LayerTreeHostImpl::CommitToActiveTree() const { |
4021 // In single threaded mode we skip the pending tree and commit directly to the | 4022 // In single threaded mode we skip the pending tree and commit directly to the |
4022 // active tree. | 4023 // active tree. |
4023 return !task_runner_provider_->HasImplThread(); | 4024 return !task_runner_provider_->HasImplThread(); |
4024 } | 4025 } |
4025 | 4026 |
4026 } // namespace cc | 4027 } // namespace cc |
OLD | NEW |