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

Side by Side Diff: ui/ozone/platform/drm/mojo/drm_gpu_delegate.cc

Issue 1309273005: native_viewport support for ozone (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebased Created 5 years, 3 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
OLDNEW
(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
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/mojo/drm_gpu_delegate.h ('k') | ui/ozone/platform/drm/mojo/drm_gpu_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698