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

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

Issue 1406333003: aura: Support SurfaceDestroyed() on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@wth2
Patch Set: comment Created 5 years, 2 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
« no previous file with comments | « ui/aura/window_tree_host_platform.h ('k') | ui/ozone/demo/ozone_demo.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_platform.h" 5 #include "ui/aura/window_tree_host_platform.h"
6 6
7 #include "base/trace_event/trace_event.h" 7 #include "base/trace_event/trace_event.h"
8 #include "ui/aura/window_event_dispatcher.h" 8 #include "ui/aura/window_event_dispatcher.h"
9 #include "ui/compositor/compositor.h" 9 #include "ui/compositor/compositor.h"
10 #include "ui/events/event.h" 10 #include "ui/events/event.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 } 161 }
162 162
163 void WindowTreeHostPlatform::OnAcceleratedWidgetAvailable( 163 void WindowTreeHostPlatform::OnAcceleratedWidgetAvailable(
164 gfx::AcceleratedWidget widget, 164 gfx::AcceleratedWidget widget,
165 float device_pixel_ratio) { 165 float device_pixel_ratio) {
166 widget_ = widget; 166 widget_ = widget;
167 CreateCompositor(); 167 CreateCompositor();
168 WindowTreeHost::OnAcceleratedWidgetAvailable(); 168 WindowTreeHost::OnAcceleratedWidgetAvailable();
169 } 169 }
170 170
171 void WindowTreeHostPlatform::OnAcceleratedWidgetDestroyed() {
172 gfx::AcceleratedWidget widget = compositor()->ReleaseAcceleratedWidget();
173 DCHECK_EQ(widget, widget_);
174 widget_ = gfx::kNullAcceleratedWidget;
175 }
176
171 void WindowTreeHostPlatform::OnActivationChanged(bool active) { 177 void WindowTreeHostPlatform::OnActivationChanged(bool active) {
172 if (active) 178 if (active)
173 OnHostActivated(); 179 OnHostActivated();
174 } 180 }
175 181
176 } // namespace aura 182 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/window_tree_host_platform.h ('k') | ui/ozone/demo/ozone_demo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698