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

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

Issue 2894523007: Use display::DisplayMode in ozone/drm/gpu (Closed)
Patch Set: review nits Created 3 years, 7 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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/drm/host/drm_display_host.h" 5 #include "ui/ozone/platform/drm/host/drm_display_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
11 #include "ui/display/types/display_mode.h" 11 #include "ui/display/types/display_mode.h"
12 #include "ui/ozone/common/display_snapshot_proxy.h" 12 #include "ui/ozone/common/display_snapshot_proxy.h"
13 #include "ui/ozone/platform/drm/common/drm_util.h"
13 #include "ui/ozone/platform/drm/host/gpu_thread_adapter.h" 14 #include "ui/ozone/platform/drm/host/gpu_thread_adapter.h"
14 15
15 namespace ui { 16 namespace ui {
16 17
17 namespace {
18
19 DisplayMode_Params GetDisplayModeParams(const display::DisplayMode& mode) {
20 DisplayMode_Params params;
21 params.size = mode.size();
22 params.is_interlaced = mode.is_interlaced();
23 params.refresh_rate = mode.refresh_rate();
24 return params;
25 }
26
27 } // namespace
28
29 DrmDisplayHost::DrmDisplayHost(GpuThreadAdapter* sender, 18 DrmDisplayHost::DrmDisplayHost(GpuThreadAdapter* sender,
30 const DisplaySnapshot_Params& params, 19 const DisplaySnapshot_Params& params,
31 bool is_dummy) 20 bool is_dummy)
32 : sender_(sender), 21 : sender_(sender),
33 snapshot_(new DisplaySnapshotProxy(params)), 22 snapshot_(new DisplaySnapshotProxy(params)),
34 is_dummy_(is_dummy) { 23 is_dummy_(is_dummy) {
35 sender_->AddGpuThreadObserver(this); 24 sender_->AddGpuThreadObserver(this);
36 } 25 }
37 26
38 DrmDisplayHost::~DrmDisplayHost() { 27 DrmDisplayHost::~DrmDisplayHost() {
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 void DrmDisplayHost::ClearCallbacks() { 130 void DrmDisplayHost::ClearCallbacks() {
142 if (!configure_callback_.is_null()) 131 if (!configure_callback_.is_null())
143 OnDisplayConfigured(false); 132 OnDisplayConfigured(false);
144 if (!get_hdcp_callback_.is_null()) 133 if (!get_hdcp_callback_.is_null())
145 OnHDCPStateReceived(false, display::HDCP_STATE_UNDESIRED); 134 OnHDCPStateReceived(false, display::HDCP_STATE_UNDESIRED);
146 if (!set_hdcp_callback_.is_null()) 135 if (!set_hdcp_callback_.is_null())
147 OnHDCPStateUpdated(false); 136 OnHDCPStateUpdated(false);
148 } 137 }
149 138
150 } // namespace ui 139 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/gpu/proxy_helpers_unittest.cc ('k') | ui/ozone/platform/drm/mus_thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698