Explicitly add python-numpy dependency to install-build-deps.
[chromium-blink-merge.git] / ui / ozone / platform / dri / dri_window_delegate_impl.cc
blobdf270ed8ad00ed92ff336a85defeb6321bfced9f
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
3 // found in the LICENSE file.
5 #include "ui/ozone/platform/dri/dri_window_delegate_impl.h"
7 #include "base/debug/trace_event.h"
8 #include "ui/ozone/platform/dri/screen_manager.h"
10 namespace ui {
12 DriWindowDelegateImpl::DriWindowDelegateImpl(gfx::AcceleratedWidget widget,
13 ScreenManager* screen_manager)
14 : widget_(widget), screen_manager_(screen_manager) {
17 DriWindowDelegateImpl::~DriWindowDelegateImpl() {
20 void DriWindowDelegateImpl::Initialize() {
21 TRACE_EVENT1("dri", "DriWindowDelegateImpl::Initialize", "widget", widget_);
24 void DriWindowDelegateImpl::Shutdown() {
25 TRACE_EVENT1("dri", "DriWindowDelegateImpl::Shutdown", "widget", widget_);
28 gfx::AcceleratedWidget DriWindowDelegateImpl::GetAcceleratedWidget() {
29 return widget_;
32 HardwareDisplayController* DriWindowDelegateImpl::GetController() {
33 return controller_.get();
36 void DriWindowDelegateImpl::OnBoundsChanged(const gfx::Rect& bounds) {
37 TRACE_EVENT2("dri", "DriWindowDelegateImpl::OnBoundsChanged", "widget",
38 widget_, "bounds", bounds.ToString());
39 controller_ = screen_manager_->GetDisplayController(bounds);
42 } // namespace ui