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

Side by Side Diff: content/test/layouttest_support.cc

Issue 2945453002: color: Use base::Feature to control color correct rendering (Closed)
Patch Set: Add histogram enum Created 3 years, 6 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/shell/app/shell_main_delegate.cc ('k') | tools/metrics/histograms/enums.xml » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/public/test/layouttest_support.h" 5 #include "content/public/test/layouttest_support.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 gpu_channel_ = gpu_channel; 338 gpu_channel_ = gpu_channel;
339 339
340 auto* task_runner = deps->GetCompositorImplThreadTaskRunner().get(); 340 auto* task_runner = deps->GetCompositorImplThreadTaskRunner().get();
341 bool synchronous_composite = !task_runner; 341 bool synchronous_composite = !task_runner;
342 if (!task_runner) 342 if (!task_runner)
343 task_runner = base::ThreadTaskRunnerHandle::Get().get(); 343 task_runner = base::ThreadTaskRunnerHandle::Get().get();
344 344
345 cc::RendererSettings renderer_settings; 345 cc::RendererSettings renderer_settings;
346 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); 346 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess();
347 renderer_settings.enable_color_correct_rendering = 347 renderer_settings.enable_color_correct_rendering =
348 cmd->HasSwitch(switches::kEnableColorCorrectRendering); 348 base::FeatureList::IsEnabled(features::kColorCorrectRendering);
349 renderer_settings.allow_antialiasing &= 349 renderer_settings.allow_antialiasing &=
350 !cmd->HasSwitch(cc::switches::kDisableCompositedAntialiasing); 350 !cmd->HasSwitch(cc::switches::kDisableCompositedAntialiasing);
351 renderer_settings.highp_threshold_min = 2048; 351 renderer_settings.highp_threshold_min = 2048;
352 352
353 constexpr bool disable_display_vsync = false; 353 constexpr bool disable_display_vsync = false;
354 constexpr double refresh_rate = 60.0; 354 constexpr double refresh_rate = 60.0;
355 auto compositor_frame_sink = base::MakeUnique<cc::TestCompositorFrameSink>( 355 auto compositor_frame_sink = base::MakeUnique<cc::TestCompositorFrameSink>(
356 std::move(compositor_context_provider), 356 std::move(compositor_context_provider),
357 std::move(worker_context_provider), nullptr /* shared_bitmap_manager */, 357 std::move(worker_context_provider), nullptr /* shared_bitmap_manager */,
358 gpu_memory_buffer_manager, renderer_settings, task_runner, 358 gpu_memory_buffer_manager, renderer_settings, task_runner,
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 } 605 }
606 } 606 }
607 607
608 bool IsNavigationInitiatedByRenderer(const blink::WebURLRequest& request) { 608 bool IsNavigationInitiatedByRenderer(const blink::WebURLRequest& request) {
609 RequestExtraData* extra_data = 609 RequestExtraData* extra_data =
610 static_cast<RequestExtraData*>(request.GetExtraData()); 610 static_cast<RequestExtraData*>(request.GetExtraData());
611 return extra_data && extra_data->navigation_initiated_by_renderer(); 611 return extra_data && extra_data->navigation_initiated_by_renderer();
612 } 612 }
613 613
614 } // namespace content 614 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/app/shell_main_delegate.cc ('k') | tools/metrics/histograms/enums.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698