| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/ozone/platform/dri/dri_window_delegate_impl.h" | 5 #include "ui/ozone/platform/dri/dri_window_delegate_impl.h" |
| 6 | 6 |
| 7 #include "base/debug/trace_event.h" |
| 7 #include "ui/ozone/platform/dri/screen_manager.h" | 8 #include "ui/ozone/platform/dri/screen_manager.h" |
| 8 | 9 |
| 9 namespace ui { | 10 namespace ui { |
| 10 | 11 |
| 11 DriWindowDelegateImpl::DriWindowDelegateImpl(gfx::AcceleratedWidget widget, | 12 DriWindowDelegateImpl::DriWindowDelegateImpl(gfx::AcceleratedWidget widget, |
| 12 ScreenManager* screen_manager) | 13 ScreenManager* screen_manager) |
| 13 : widget_(widget), screen_manager_(screen_manager) { | 14 : widget_(widget), screen_manager_(screen_manager) { |
| 14 } | 15 } |
| 15 | 16 |
| 16 DriWindowDelegateImpl::~DriWindowDelegateImpl() { | 17 DriWindowDelegateImpl::~DriWindowDelegateImpl() { |
| 17 } | 18 } |
| 18 | 19 |
| 19 void DriWindowDelegateImpl::Initialize() { | 20 void DriWindowDelegateImpl::Initialize() { |
| 21 TRACE_EVENT1("dri", "DriWindowDelegateImpl::Initialize", "widget", widget_); |
| 20 } | 22 } |
| 21 | 23 |
| 22 void DriWindowDelegateImpl::Shutdown() { | 24 void DriWindowDelegateImpl::Shutdown() { |
| 25 TRACE_EVENT1("dri", "DriWindowDelegateImpl::Shutdown", "widget", widget_); |
| 23 } | 26 } |
| 24 | 27 |
| 25 gfx::AcceleratedWidget DriWindowDelegateImpl::GetAcceleratedWidget() { | 28 gfx::AcceleratedWidget DriWindowDelegateImpl::GetAcceleratedWidget() { |
| 26 return widget_; | 29 return widget_; |
| 27 } | 30 } |
| 28 | 31 |
| 29 HardwareDisplayController* DriWindowDelegateImpl::GetController() { | 32 HardwareDisplayController* DriWindowDelegateImpl::GetController() { |
| 30 return controller_.get(); | 33 return controller_.get(); |
| 31 } | 34 } |
| 32 | 35 |
| 33 void DriWindowDelegateImpl::OnBoundsChanged(const gfx::Rect& bounds) { | 36 void DriWindowDelegateImpl::OnBoundsChanged(const gfx::Rect& bounds) { |
| 37 TRACE_EVENT2("dri", |
| 38 "DriWindowDelegateImpl::OnBoundsChanged", |
| 39 "widget", |
| 40 widget_, |
| 41 "bounds", |
| 42 bounds.ToString()); |
| 34 controller_ = screen_manager_->GetDisplayController(bounds); | 43 controller_ = screen_manager_->GetDisplayController(bounds); |
| 35 } | 44 } |
| 36 | 45 |
| 37 } // namespace ui | 46 } // namespace ui |
| OLD | NEW |