diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-03 19:29:35 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-03 19:29:35 +0000 |
commit | ac1802b02b0a69b77902e4a4daef7ce4c084044c (patch) | |
tree | 9b4e041bbae6eda862d7bae5b62026ca438a25e4 /ui/aura | |
parent | 9772b5725965c3078290589373d0caa250254532 (diff) | |
download | chromium_src-ac1802b02b0a69b77902e4a4daef7ce4c084044c.zip chromium_src-ac1802b02b0a69b77902e4a4daef7ce4c084044c.tar.gz chromium_src-ac1802b02b0a69b77902e4a4daef7ce4c084044c.tar.bz2 |
Relanding this with fixes for ash_unittests failures on the windows 8 builder.
Recreate and reinitialize the compositor when we receive the target HWND from the metro viewer process on Windows 8 ASH.
This ensures that the compositor paints on the correct surface.
Fixes a regression which occurred after the latest aura refactoring changes. This resulted in nothing painting
in Windows 8 ASH.
Ben's change to address the metro painting issue was reverted on Dec 20th due to ash_unittest crashes.
This fix works well with the ash_unittests and regular Chrome code path.
TBR'ing beng. Will address comments from him in a followup.
BUG=330179
R=ben@chromium.org, cpu@chromium.org
TBR=ben
Review URL: https://codereview.chromium.org/108893005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242910 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/aura')
-rw-r--r-- | ui/aura/remote_root_window_host_win.cc | 4 | ||||
-rw-r--r-- | ui/aura/window_tree_host.cc | 12 | ||||
-rw-r--r-- | ui/aura/window_tree_host.h | 2 |
3 files changed, 14 insertions, 4 deletions
diff --git a/ui/aura/remote_root_window_host_win.cc b/ui/aura/remote_root_window_host_win.cc index b8c14b7..18296f5 100644 --- a/ui/aura/remote_root_window_host_win.cc +++ b/ui/aura/remote_root_window_host_win.cc @@ -174,6 +174,10 @@ void RemoteRootWindowHostWin::Connected(IPC::Sender* host, HWND remote_window) { CHECK(host_ == NULL); host_ = host; remote_window_ = remote_window; + // Recreate the compositor for the target surface represented by the + // remote_window HWND. + CreateCompositor(remote_window_); + InitCompositor(); } void RemoteRootWindowHostWin::Disconnected() { diff --git a/ui/aura/window_tree_host.cc b/ui/aura/window_tree_host.cc index 2702f2f..f29039c 100644 --- a/ui/aura/window_tree_host.cc +++ b/ui/aura/window_tree_host.cc @@ -82,15 +82,19 @@ RootWindowHost::~RootWindowHost() { } void RootWindowHost::InitHost() { + window()->Init(ui::LAYER_NOT_DRAWN); + InitCompositor(); + UpdateRootWindowSize(GetBounds().size()); + Env::GetInstance()->NotifyRootWindowInitialized(delegate_->AsRootWindow()); + window()->Show(); +} + +void RootWindowHost::InitCompositor() { compositor_->SetScaleAndSize(GetDeviceScaleFactorFromDisplay(window()), GetBounds().size()); - window()->Init(ui::LAYER_NOT_DRAWN); compositor_->SetRootLayer(window()->layer()); transformer_.reset( new SimpleRootWindowTransformer(window(), gfx::Transform())); - UpdateRootWindowSize(GetBounds().size()); - Env::GetInstance()->NotifyRootWindowInitialized(delegate_->AsRootWindow()); - window()->Show(); } aura::Window* RootWindowHost::window() { diff --git a/ui/aura/window_tree_host.h b/ui/aura/window_tree_host.h index 8e1ddd0..ac18bfd 100644 --- a/ui/aura/window_tree_host.h +++ b/ui/aura/window_tree_host.h @@ -42,6 +42,8 @@ class AURA_EXPORT RootWindowHost { void InitHost(); + void InitCompositor(); + // TODO(beng): these will become trivial accessors in a future CL. aura::Window* window(); const aura::Window* window() const; |