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

Unified Diff: ui/aura/window_tree_host.cc

Issue 119753007: Add GrabWindowSnapshotAsync tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased, compiling 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/aura/window_tree_host.h ('k') | ui/keyboard/keyboard_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()));
« no previous file with comments | « ui/aura/window_tree_host.h ('k') | ui/keyboard/keyboard_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698