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

Side by Side Diff: ui/ozone/platform/drm/host/drm_overlay_manager.cc

Issue 1285183008: Ozone integration. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: add missing license header Created 5 years, 4 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/host/drm_overlay_manager.h"
6
7 #include "base/command_line.h"
8 #include "ui/gfx/geometry/rect_conversions.h"
9 #include "ui/ozone/platform/drm/host/drm_overlay_candidates_host.h"
10 #include "ui/ozone/public/overlay_candidates_ozone.h"
11 #include "ui/ozone/public/ozone_switches.h"
12
13 namespace ui {
14
15 DrmOverlayManager::DrmOverlayManager(
16 bool allow_surfaceless,
17 DrmGpuPlatformSupportHost* platform_support_host)
18 : platform_support_host_(platform_support_host),
19 allow_surfaceless_(allow_surfaceless) {
20 is_supported_ = base::CommandLine::ForCurrentProcess()->HasSwitch(
21 switches::kOzoneTestSingleOverlaySupport);
22 }
23
24 DrmOverlayManager::~DrmOverlayManager() {
25 }
26
27 scoped_ptr<OverlayCandidatesOzone> DrmOverlayManager::CreateOverlayCandidates(
28 gfx::AcceleratedWidget w) {
29 if (!is_supported_)
30 return nullptr;
31 return make_scoped_ptr(
32 new DrmOverlayCandidatesHost(w, platform_support_host_));
33 }
34
35 bool DrmOverlayManager::CanShowPrimaryPlaneAsOverlay() {
36 return allow_surfaceless_;
37 }
38
39 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/host/drm_overlay_manager.h ('k') | ui/ozone/platform/drm/host/drm_window_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698