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

Unified Diff: ui/views/mus/window_manager_connection.cc

Issue 2249413004: services/ui: Allow injecting the IO thread task runner for gpu channel. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 4 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 | « ui/views/mus/window_manager_connection.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/mus/window_manager_connection.cc
diff --git a/ui/views/mus/window_manager_connection.cc b/ui/views/mus/window_manager_connection.cc
index ef2f6eb5d490b098c39efb6c4a1b76f84a3047a8..bfa45230e7d99218d36a55163e4bba8e5a59c273 100644
--- a/ui/views/mus/window_manager_connection.cc
+++ b/ui/views/mus/window_manager_connection.cc
@@ -58,10 +58,11 @@ WindowManagerConnection::~WindowManagerConnection() {
// static
std::unique_ptr<WindowManagerConnection> WindowManagerConnection::Create(
shell::Connector* connector,
- const shell::Identity& identity) {
+ const shell::Identity& identity,
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
DCHECK(!lazy_tls_ptr.Pointer()->Get());
WindowManagerConnection* connection =
- new WindowManagerConnection(connector, identity);
+ new WindowManagerConnection(connector, identity, std::move(task_runner));
DCHECK(lazy_tls_ptr.Pointer()->Get());
return base::WrapUnique(connection);
}
@@ -106,11 +107,12 @@ const std::set<ui::Window*>& WindowManagerConnection::GetRoots() const {
WindowManagerConnection::WindowManagerConnection(
shell::Connector* connector,
- const shell::Identity& identity)
+ const shell::Identity& identity,
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner)
: connector_(connector), identity_(identity) {
lazy_tls_ptr.Pointer()->Set(this);
- gpu_service_ = ui::GpuService::Initialize(connector);
+ gpu_service_ = ui::GpuService::Create(connector, std::move(task_runner));
compositor_context_factory_.reset(
new views::SurfaceContextFactory(gpu_service_.get()));
aura::Env::GetInstance()->set_context_factory(
« no previous file with comments | « ui/views/mus/window_manager_connection.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698