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

Unified Diff: ui/aura/window_tree_host.cc

Issue 1513053002: WIP - Gutterless resize on Windows Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: feedback Created 5 years 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
Index: ui/aura/window_tree_host.cc
diff --git a/ui/aura/window_tree_host.cc b/ui/aura/window_tree_host.cc
index bb988e1f86d9c2e5cde4e569ce056bbf4cbd0ec6..3d4d53cbebef3ea209f6e2a2423e9e437b9b6283 100644
--- a/ui/aura/window_tree_host.cc
+++ b/ui/aura/window_tree_host.cc
@@ -1,3 +1,4 @@
+
// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -26,6 +27,10 @@
#include "ui/gfx/geometry/size_conversions.h"
#include "ui/gfx/screen.h"
+#if defined(OS_WIN)
+#include "ui/base/window_resize_helper.h"
+#endif
+
namespace aura {
const char kWindowTreeHostForAcceleratedWidget[] =
@@ -243,8 +248,14 @@ void WindowTreeHost::CreateCompositor() {
DCHECK(Env::GetInstance());
ui::ContextFactory* context_factory = Env::GetInstance()->context_factory();
DCHECK(context_factory);
- compositor_.reset(
- new ui::Compositor(context_factory, base::ThreadTaskRunnerHandle::Get()));
+#if defined(OS_WIN)
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner =
+ ui::WindowResizeHelper::Get()->task_runner();
+#else
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner =
+ base::ThreadTaskRunnerHandle::Get();
+#endif
+ compositor_.reset(new ui::Compositor(context_factory, task_runner));
if (!dispatcher()) {
window()->Init(ui::LAYER_NOT_DRAWN);
window()->set_host(this);

Powered by Google App Engine
This is Rietveld 408576698