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

Side by Side Diff: ui/aura/window_tree_host.cc

Issue 132473007: aura: Destroy the compositor before destroying the backing window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: destroy-window: Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | ui/gfx/win/window_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ui/aura/window_tree_host.h" 5 #include "ui/aura/window_tree_host.h"
6 6
7 #include "ui/aura/env.h" 7 #include "ui/aura/env.h"
8 #include "ui/aura/root_window.h" 8 #include "ui/aura/root_window.h"
9 #include "ui/aura/root_window_transformer.h" 9 #include "ui/aura/root_window_transformer.h"
10 #include "ui/aura/window.h" 10 #include "ui/aura/window.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 *point = gfx::ToFlooredPoint(point_3f.AsPointF()); 160 *point = gfx::ToFlooredPoint(point_3f.AsPointF());
161 } 161 }
162 162
163 //////////////////////////////////////////////////////////////////////////////// 163 ////////////////////////////////////////////////////////////////////////////////
164 // WindowTreeHost, protected: 164 // WindowTreeHost, protected:
165 165
166 WindowTreeHost::WindowTreeHost() 166 WindowTreeHost::WindowTreeHost()
167 : delegate_(NULL) { 167 : delegate_(NULL) {
168 } 168 }
169 169
170 void WindowTreeHost::DestroyCompositor() { compositor_.reset(); } 170 void WindowTreeHost::DestroyCompositor() {
171 DCHECK(GetAcceleratedWidget());
172 compositor_.reset();
173 }
171 174
172 void WindowTreeHost::CreateCompositor( 175 void WindowTreeHost::CreateCompositor(
173 gfx::AcceleratedWidget accelerated_widget) { 176 gfx::AcceleratedWidget accelerated_widget) {
174 compositor_.reset(new ui::Compositor(GetAcceleratedWidget())); 177 compositor_.reset(new ui::Compositor(GetAcceleratedWidget()));
175 DCHECK(compositor_.get()); 178 DCHECK(compositor_.get());
176 } 179 }
177 180
178 void WindowTreeHost::NotifyHostResized(const gfx::Size& new_size) { 181 void WindowTreeHost::NotifyHostResized(const gfx::Size& new_size) {
179 // The compositor should have the same size as the native root window host. 182 // The compositor should have the same size as the native root window host.
180 // Get the latest scale from display because it might have been changed. 183 // Get the latest scale from display because it might have been changed.
(...skipping 11 matching lines...) Expand all
192 WindowTreeHost* WindowTreeHost::Create(const gfx::Rect& bounds) { 195 WindowTreeHost* WindowTreeHost::Create(const gfx::Rect& bounds) {
193 // This is only hit for tests and ash, right now these aren't an issue so 196 // This is only hit for tests and ash, right now these aren't an issue so
194 // adding the CHECK. 197 // adding the CHECK.
195 // TODO(sky): decide if we want a factory. 198 // TODO(sky): decide if we want a factory.
196 CHECK(false); 199 CHECK(false);
197 return NULL; 200 return NULL;
198 } 201 }
199 #endif 202 #endif
200 203
201 } // namespace aura 204 } // namespace aura
OLDNEW
« no previous file with comments | « no previous file | ui/gfx/win/window_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698