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

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

Issue 2871893002: color: Ensure solid color IOSurface layers are sRGB (Closed)
Patch Set: Fix up deps Created 3 years, 7 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 (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 8
9 #include <cmath> 9 #include <cmath>
10 #include <limits> 10 #include <limits>
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 #include "gpu/command_buffer/service/gpu_switches.h" 59 #include "gpu/command_buffer/service/gpu_switches.h"
60 #include "services/ui/public/cpp/gpu/context_provider_command_buffer.h" 60 #include "services/ui/public/cpp/gpu/context_provider_command_buffer.h"
61 #include "third_party/WebKit/public/platform/WebCompositeAndReadbackAsyncCallbac k.h" 61 #include "third_party/WebKit/public/platform/WebCompositeAndReadbackAsyncCallbac k.h"
62 #include "third_party/WebKit/public/platform/WebCompositorMutatorClient.h" 62 #include "third_party/WebKit/public/platform/WebCompositorMutatorClient.h"
63 #include "third_party/WebKit/public/platform/WebLayoutAndPaintAsyncCallback.h" 63 #include "third_party/WebKit/public/platform/WebLayoutAndPaintAsyncCallback.h"
64 #include "third_party/WebKit/public/platform/WebSize.h" 64 #include "third_party/WebKit/public/platform/WebSize.h"
65 #include "third_party/WebKit/public/platform/scheduler/renderer/renderer_schedul er.h" 65 #include "third_party/WebKit/public/platform/scheduler/renderer/renderer_schedul er.h"
66 #include "third_party/WebKit/public/web/WebKit.h" 66 #include "third_party/WebKit/public/web/WebKit.h"
67 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" 67 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h"
68 #include "third_party/WebKit/public/web/WebSelection.h" 68 #include "third_party/WebKit/public/web/WebSelection.h"
69 #include "ui/gfx/switches.h"
69 #include "ui/gl/gl_switches.h" 70 #include "ui/gl/gl_switches.h"
70 #include "ui/native_theme/native_theme_features.h" 71 #include "ui/native_theme/native_theme_features.h"
71 #include "ui/native_theme/overlay_scrollbar_constants_aura.h" 72 #include "ui/native_theme/overlay_scrollbar_constants_aura.h"
72 73
73 namespace base { 74 namespace base {
74 class Value; 75 class Value;
75 } 76 }
76 77
77 namespace cc { 78 namespace cc {
78 class Layer; 79 class Layer;
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 settings.can_use_lcd_text = compositor_deps->IsLcdTextEnabled(); 378 settings.can_use_lcd_text = compositor_deps->IsLcdTextEnabled();
378 settings.use_distance_field_text = 379 settings.use_distance_field_text =
379 compositor_deps->IsDistanceFieldTextEnabled(); 380 compositor_deps->IsDistanceFieldTextEnabled();
380 settings.use_zero_copy = compositor_deps->IsZeroCopyEnabled(); 381 settings.use_zero_copy = compositor_deps->IsZeroCopyEnabled();
381 settings.use_partial_raster = compositor_deps->IsPartialRasterEnabled(); 382 settings.use_partial_raster = compositor_deps->IsPartialRasterEnabled();
382 settings.enable_elastic_overscroll = 383 settings.enable_elastic_overscroll =
383 compositor_deps->IsElasticOverscrollEnabled(); 384 compositor_deps->IsElasticOverscrollEnabled();
384 settings.renderer_settings.use_gpu_memory_buffer_resources = 385 settings.renderer_settings.use_gpu_memory_buffer_resources =
385 compositor_deps->IsGpuMemoryBufferCompositorResourcesEnabled(); 386 compositor_deps->IsGpuMemoryBufferCompositorResourcesEnabled();
386 settings.enable_color_correct_rasterization = 387 settings.enable_color_correct_rasterization =
387 cmd.HasSwitch(cc::switches::kEnableColorCorrectRendering); 388 cmd.HasSwitch(switches::kEnableColorCorrectRendering);
388 settings.renderer_settings.buffer_to_texture_target_map = 389 settings.renderer_settings.buffer_to_texture_target_map =
389 compositor_deps->GetBufferToTextureTargetMap(); 390 compositor_deps->GetBufferToTextureTargetMap();
390 391
391 // Build LayerTreeSettings from command line args. 392 // Build LayerTreeSettings from command line args.
392 LayerTreeSettingsFactory::SetBrowserControlsSettings(settings, cmd); 393 LayerTreeSettingsFactory::SetBrowserControlsSettings(settings, cmd);
393 394
394 settings.use_layer_lists = cmd.HasSwitch(cc::switches::kEnableLayerLists); 395 settings.use_layer_lists = cmd.HasSwitch(cc::switches::kEnableLayerLists);
395 396
396 settings.renderer_settings.allow_antialiasing &= 397 settings.renderer_settings.allow_antialiasing &=
397 !cmd.HasSwitch(cc::switches::kDisableCompositedAntialiasing); 398 !cmd.HasSwitch(cc::switches::kDisableCompositedAntialiasing);
(...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after
1208 const cc::LocalSurfaceId& local_surface_id) { 1209 const cc::LocalSurfaceId& local_surface_id) {
1209 layer_tree_host_->SetLocalSurfaceId(local_surface_id); 1210 layer_tree_host_->SetLocalSurfaceId(local_surface_id);
1210 } 1211 }
1211 1212
1212 void RenderWidgetCompositor::NotifySwapTime(ReportTimeCallback callback) { 1213 void RenderWidgetCompositor::NotifySwapTime(ReportTimeCallback callback) {
1213 QueueSwapPromise(base::MakeUnique<ReportTimeSwapPromise>( 1214 QueueSwapPromise(base::MakeUnique<ReportTimeSwapPromise>(
1214 std::move(callback), base::ThreadTaskRunnerHandle::Get())); 1215 std::move(callback), base::ThreadTaskRunnerHandle::Get()));
1215 } 1216 }
1216 1217
1217 } // namespace content 1218 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698