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

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

Issue 2102203003: Color: Plumb color profile from ui::Compositor to cc::DirectRenderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix ozone build Created 4 years, 5 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
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 <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
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::ColorProfile(), DeviceViewport(), DeviceClip(),
1690 disable_picture_quad_image_filtering);
1690 } else { 1691 } else {
1691 renderer_->DrawFrame(&frame->render_passes, 1692 renderer_->DrawFrame(
1692 active_tree_->device_scale_factor(), DeviceViewport(), 1693 &frame->render_passes, active_tree_->device_scale_factor(),
1693 DeviceClip(), false); 1694 gfx::ColorProfile(), 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 2304 matching lines...) Expand 10 before | Expand all | Expand 10 after
4008 return task_runner_provider_->HasImplThread(); 4009 return task_runner_provider_->HasImplThread();
4009 } 4010 }
4010 4011
4011 bool LayerTreeHostImpl::CommitToActiveTree() const { 4012 bool LayerTreeHostImpl::CommitToActiveTree() const {
4012 // In single threaded mode we skip the pending tree and commit directly to the 4013 // In single threaded mode we skip the pending tree and commit directly to the
4013 // active tree. 4014 // active tree.
4014 return !task_runner_provider_->HasImplThread(); 4015 return !task_runner_provider_->HasImplThread();
4015 } 4016 }
4016 4017
4017 } // namespace cc 4018 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698