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

Side by Side Diff: content/renderer/gpu/render_widget_compositor.cc

Issue 2328133002: Add cc::LayerTreeSettings for color correct rendering (Closed)
Patch Set: Move to LayerTreeSettings Created 4 years, 3 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
« no previous file with comments | « content/public/common/content_switches.cc ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "content/renderer/gpu/render_widget_compositor.h" 5 #include "content/renderer/gpu/render_widget_compositor.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <limits> 8 #include <limits>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 335
336 settings.can_use_lcd_text = compositor_deps->IsLcdTextEnabled(); 336 settings.can_use_lcd_text = compositor_deps->IsLcdTextEnabled();
337 settings.use_distance_field_text = 337 settings.use_distance_field_text =
338 compositor_deps->IsDistanceFieldTextEnabled(); 338 compositor_deps->IsDistanceFieldTextEnabled();
339 settings.use_zero_copy = compositor_deps->IsZeroCopyEnabled(); 339 settings.use_zero_copy = compositor_deps->IsZeroCopyEnabled();
340 settings.use_partial_raster = compositor_deps->IsPartialRasterEnabled(); 340 settings.use_partial_raster = compositor_deps->IsPartialRasterEnabled();
341 settings.enable_elastic_overscroll = 341 settings.enable_elastic_overscroll =
342 compositor_deps->IsElasticOverscrollEnabled(); 342 compositor_deps->IsElasticOverscrollEnabled();
343 settings.renderer_settings.use_gpu_memory_buffer_resources = 343 settings.renderer_settings.use_gpu_memory_buffer_resources =
344 compositor_deps->IsGpuMemoryBufferCompositorResourcesEnabled(); 344 compositor_deps->IsGpuMemoryBufferCompositorResourcesEnabled();
345 settings.enable_color_correct_rendering =
346 cmd.HasSwitch(cc::switches::kEnableColorCorrectRendering);
345 settings.renderer_settings.buffer_to_texture_target_map = 347 settings.renderer_settings.buffer_to_texture_target_map =
346 compositor_deps->GetBufferToTextureTargetMap(); 348 compositor_deps->GetBufferToTextureTargetMap();
347 settings.image_decode_tasks_enabled = 349 settings.image_decode_tasks_enabled =
348 compositor_deps->AreImageDecodeTasksEnabled(); 350 compositor_deps->AreImageDecodeTasksEnabled();
349 351
350 // Build LayerTreeSettings from command line args. 352 // Build LayerTreeSettings from command line args.
351 LayerTreeSettingsFactory::SetTopControlsSettings(settings, cmd); 353 LayerTreeSettingsFactory::SetTopControlsSettings(settings, cmd);
352 354
353 settings.use_layer_lists = cmd.HasSwitch(cc::switches::kEnableLayerLists); 355 settings.use_layer_lists = cmd.HasSwitch(cc::switches::kEnableLayerLists);
354 356
(...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after
1143 1145
1144 remote_proto_channel_receiver_->OnProtoReceived(std::move(deserialized)); 1146 remote_proto_channel_receiver_->OnProtoReceived(std::move(deserialized));
1145 } 1147 }
1146 1148
1147 void RenderWidgetCompositor::SetPaintedDeviceScaleFactor( 1149 void RenderWidgetCompositor::SetPaintedDeviceScaleFactor(
1148 float device_scale) { 1150 float device_scale) {
1149 layer_tree_host_->GetLayerTree()->SetPaintedDeviceScaleFactor(device_scale); 1151 layer_tree_host_->GetLayerTree()->SetPaintedDeviceScaleFactor(device_scale);
1150 } 1152 }
1151 1153
1152 } // namespace content 1154 } // namespace content
OLDNEW
« no previous file with comments | « content/public/common/content_switches.cc ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698