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

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

Issue 2857983003: Use constexpr TaskTraits constructor in content. (Closed)
Patch Set: CR gab #8 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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 params.client = client; 240 params.client = client;
241 params.settings = &settings; 241 params.settings = &settings;
242 params.task_graph_runner = deps->GetTaskGraphRunner(); 242 params.task_graph_runner = deps->GetTaskGraphRunner();
243 params.main_task_runner = deps->GetCompositorMainThreadTaskRunner(); 243 params.main_task_runner = deps->GetCompositorMainThreadTaskRunner();
244 params.mutator_host = mutator_host; 244 params.mutator_host = mutator_host;
245 if (base::TaskScheduler::GetInstance()) { 245 if (base::TaskScheduler::GetInstance()) {
246 // The image worker thread needs to allow waiting since it makes discardable 246 // The image worker thread needs to allow waiting since it makes discardable
247 // shared memory allocations which need to make synchronous calls to the 247 // shared memory allocations which need to make synchronous calls to the
248 // IO thread. 248 // IO thread.
249 params.image_worker_task_runner = base::CreateSequencedTaskRunnerWithTraits( 249 params.image_worker_task_runner = base::CreateSequencedTaskRunnerWithTraits(
250 base::TaskTraits() 250 {base::WithBaseSyncPrimitives(), base::TaskPriority::BACKGROUND,
251 .WithPriority(base::TaskPriority::BACKGROUND) 251 base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN});
252 .WithShutdownBehavior(
253 base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN)
254 .WithBaseSyncPrimitives());
255 } 252 }
256 if (!is_threaded) { 253 if (!is_threaded) {
257 // Single-threaded layout tests. 254 // Single-threaded layout tests.
258 layer_tree_host = 255 layer_tree_host =
259 cc::LayerTreeHost::CreateSingleThreaded(single_thread_client, &params); 256 cc::LayerTreeHost::CreateSingleThreaded(single_thread_client, &params);
260 } else { 257 } else {
261 layer_tree_host = cc::LayerTreeHost::CreateThreaded( 258 layer_tree_host = cc::LayerTreeHost::CreateThreaded(
262 deps->GetCompositorImplThreadTaskRunner(), &params); 259 deps->GetCompositorImplThreadTaskRunner(), &params);
263 } 260 }
264 261
(...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after
1149 void RenderWidgetCompositor::SetContentSourceId(uint32_t id) { 1146 void RenderWidgetCompositor::SetContentSourceId(uint32_t id) {
1150 layer_tree_host_->SetContentSourceId(id); 1147 layer_tree_host_->SetContentSourceId(id);
1151 } 1148 }
1152 1149
1153 void RenderWidgetCompositor::SetLocalSurfaceId( 1150 void RenderWidgetCompositor::SetLocalSurfaceId(
1154 const cc::LocalSurfaceId& local_surface_id) { 1151 const cc::LocalSurfaceId& local_surface_id) {
1155 layer_tree_host_->SetLocalSurfaceId(local_surface_id); 1152 layer_tree_host_->SetLocalSurfaceId(local_surface_id);
1156 } 1153 }
1157 1154
1158 } // namespace content 1155 } // namespace content
OLDNEW
« no previous file with comments | « content/public/browser/browser_thread.h ('k') | content/shell/browser/shell_url_request_context_getter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698