| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |