Commit 6f9509bd authored by Gabriel Charette's avatar Gabriel Charette Committed by Commit Bot

[base] Make PostTask destination explicit in /content/gpu

Task APIs v3 will all have an explicit destination. In the past
"default traits" meant ThreadPool. These CLs are thus a no-op
except for the few callers that clearly wanted to post a QuitClosure()
on the current thread (posting a QuitClosure() to a parallel task will
merely bounce it back to the current thread anyways). Those few callers
were migrated to ThreadTaskRunnerHandle::Get().

These changes are thus required to phase out task APIs v2 (post_task.h)
Design doc: https://docs.google.com/document/d/1tssusPykvx3g0gvbvU4HxGyn3MjJlIylnsH13-Tv6s4/edit

This specific change is a subset of
https://chromium-review.googlesource.com/c/chromium/src/+/2216733

This CL was uploaded by git cl split.

R=zmo@chromium.org

Bug: 1026641
Change-Id: I96280e6c82a78a76b838b6d15d92b5b7aab42708
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2217207
Commit-Queue: Gabriel Charette <gab@chromium.org>
Auto-Submit: Gabriel Charette <gab@chromium.org>
Reviewed-by: default avatarZhenyao Mo <zmo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#772384}
parent fce1db03
......@@ -17,8 +17,8 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "base/system/sys_info.h"
#include "base/task/post_task.h"
#include "base/task/single_thread_task_executor.h"
#include "base/task/thread_pool.h"
#include "base/threading/platform_thread.h"
#include "base/timer/hi_res_timer_manager.h"
#include "base/trace_event/trace_event.h"
......@@ -365,7 +365,7 @@ int GpuMain(const MainFunctionParams& parameters) {
// ui::GbmDevice() takes >50ms with amdgpu, so kick off
// GpuMemoryBufferSupportX11 creation on another thread now.
if (gpu_preferences.enable_native_gpu_memory_buffers) {
base::PostTask(
base::ThreadPool::PostTask(
FROM_HERE, base::BindOnce([]() {
SCOPED_UMA_HISTOGRAM_TIMER("Linux.X11.GbmSupportX11CreationTime");
ui::GpuMemoryBufferSupportX11::GetInstance();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment