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

Unified Diff: content/renderer/gpu/render_widget_compositor.cc

Issue 2714863005: content: Add switch to enable checker-imaging. (Closed)
Patch Set: comment Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/gpu/render_widget_compositor.cc
diff --git a/content/renderer/gpu/render_widget_compositor.cc b/content/renderer/gpu/render_widget_compositor.cc
index a7642b16027d907674c1efd874bea5ea68ff89e5..562a445d1dfe6c871887655bcd4af98de4b44ce0 100644
--- a/content/renderer/gpu/render_widget_compositor.cc
+++ b/content/renderer/gpu/render_widget_compositor.cc
@@ -240,11 +240,15 @@ std::unique_ptr<cc::LayerTreeHost> RenderWidgetCompositor::CreateLayerTreeHost(
params.main_task_runner = deps->GetCompositorMainThreadTaskRunner();
params.mutator_host = mutator_host;
if (base::TaskScheduler::GetInstance()) {
+ // The image worker thread needs to allow waiting since it makes discardable
+ // shared memory allocations which need to make synchronous calls to the
+ // IO thread.
params.image_worker_task_runner = base::CreateSequencedTaskRunnerWithTraits(
base::TaskTraits()
.WithPriority(base::TaskPriority::BACKGROUND)
.WithShutdownBehavior(
- base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN));
+ base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN)
+ .WithBaseSyncPrimitives());
}
if (!is_threaded) {
// Single-threaded layout tests.
@@ -273,6 +277,9 @@ cc::LayerTreeSettings RenderWidgetCompositor::GenerateLayerTreeSettings(
settings.main_frame_before_activation_enabled =
cmd.HasSwitch(cc::switches::kEnableMainFrameBeforeActivation);
+ settings.enable_checker_imaging =
+ cmd.HasSwitch(cc::switches::kEnableCheckerImaging);
+
// TODO(danakj): This should not be a setting O_O; it should change when the
// device scale factor on LayerTreeHost changes.
settings.default_tile_size =
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698