OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "ui/ozone/platform/drm/mojo/drm_gpu_delegate.h" |
| 6 |
| 7 #include "mojo/converters/geometry/geometry_type_converters.h" |
| 8 #include "mojo/converters/ozone_drm_gpu/ozone_drm_gpu_type_converters.h" |
| 9 #include "ui/ozone/public/ozone_platform.h" |
| 10 |
| 11 namespace ui { |
| 12 |
| 13 MojoDrmGpuDelegate::MojoDrmGpuDelegate(mojo::OzoneDrmHost* ozone_drm_host) |
| 14 : ozone_drm_host_(ozone_drm_host) { |
| 15 ui::OzonePlatform::InitializeForGPU(); |
| 16 |
| 17 auto platform_support = static_cast<ui::DrmGpuPlatformSupport*>( |
| 18 ui::OzonePlatform::GetInstance()->GetGpuPlatformSupport()); |
| 19 |
| 20 platform_support->SetDelegate(this); |
| 21 } |
| 22 |
| 23 MojoDrmGpuDelegate::~MojoDrmGpuDelegate() {} |
| 24 |
| 25 void MojoDrmGpuDelegate::UpdateNativeDisplays( |
| 26 const std::vector<ui::DisplaySnapshot_Params>& displays) { |
| 27 ozone_drm_host_->UpdateNativeDisplays( |
| 28 mojo::Array<mojo::DisplaySnapshotPtr>::From(displays)); |
| 29 } |
| 30 |
| 31 void MojoDrmGpuDelegate::DisplayConfigured(int64_t id, bool result) { |
| 32 ozone_drm_host_->DisplayConfigured(id, result); |
| 33 } |
| 34 |
| 35 } // namespace ui |
OLD | NEW |