| Index: ui/aura/window_tree_host.cc
|
| diff --git a/ui/aura/window_tree_host.cc b/ui/aura/window_tree_host.cc
|
| index 65ad7543ac96c5cb833c0529e19aa4a63fee7ebb..bb3561e6b0eee214983f25d22c614379406948c9 100644
|
| --- a/ui/aura/window_tree_host.cc
|
| +++ b/ui/aura/window_tree_host.cc
|
| @@ -73,12 +73,7 @@ class SimpleRootWindowTransformer : public RootWindowTransformer {
|
| // WindowTreeHost, public:
|
|
|
| WindowTreeHost::~WindowTreeHost() {
|
| - // TODO(beng): this represents an ordering change. In the old code, the
|
| - // compositor was reset before the window hierarchy was destroyed.
|
| - // verify that this has no adverse effects.
|
| - // Make sure to destroy the compositor before terminating so that state is
|
| - // cleared and we don't hit asserts.
|
| - compositor_.reset();
|
| + DCHECK(!compositor_) << "compositor must be destroyed before root window";
|
| }
|
|
|
| void WindowTreeHost::InitHost() {
|
| @@ -172,6 +167,8 @@ WindowTreeHost::WindowTreeHost()
|
| : delegate_(NULL) {
|
| }
|
|
|
| +void WindowTreeHost::DestroyCompositor() { compositor_.reset(); }
|
| +
|
| void WindowTreeHost::CreateCompositor(
|
| gfx::AcceleratedWidget accelerated_widget) {
|
| compositor_.reset(new ui::Compositor(GetAcceleratedWidget()));
|
|
|