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

Side by Side Diff: ui/ozone/platform/drm/gpu/drm_display.h

Issue 1129923004: [1/2][Ozone-Drm] Refactor GPU display management (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@handle-display-init2
Patch Set: . Created 5 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
« no previous file with comments | « ui/ozone/platform/drm/drm.gypi ('k') | ui/ozone/platform/drm/gpu/drm_display.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef UI_OZONE_PLATFORM_DRM_GPU_DRM_DISPLAY_H_
6 #define UI_OZONE_PLATFORM_DRM_GPU_DRM_DISPLAY_H_
7
8 #include <vector>
9
10 #include "base/memory/ref_counted.h"
11 #include "ui/display/types/display_constants.h"
12
13 typedef struct _drmModeModeInfo drmModeModeInfo;
14
15 namespace gfx {
16 class Point;
17 }
18
19 namespace ui {
20
21 class DrmDevice;
22 class ScreenManager;
23
24 struct GammaRampRGBEntry;
25
26 class DrmDisplay {
27 public:
28 DrmDisplay(ScreenManager* screen_manager,
29 int64_t display_id,
30 const scoped_refptr<DrmDevice>& drm,
31 uint32_t crtc,
32 uint32_t connector,
33 const std::vector<drmModeModeInfo>& modes);
34 ~DrmDisplay();
35
36 int64_t display_id() const { return display_id_; }
37 scoped_refptr<DrmDevice> drm() const { return drm_; }
38 uint32_t crtc() const { return crtc_; }
39 uint32_t connector() const { return connector_; }
40 const std::vector<drmModeModeInfo>& modes() const { return modes_; }
41
42 bool Configure(const drmModeModeInfo* mode, const gfx::Point& origin);
43 bool GetHDCPState(HDCPState* state);
44 bool SetHDCPState(HDCPState state);
45 void SetGammaRamp(const std::vector<GammaRampRGBEntry>& lut);
46
47 private:
48 ScreenManager* screen_manager_; // Not owned.
49
50 int64_t display_id_;
51 scoped_refptr<DrmDevice> drm_;
52 uint32_t crtc_;
53 uint32_t connector_;
54 std::vector<drmModeModeInfo> modes_;
55
56 DISALLOW_COPY_AND_ASSIGN(DrmDisplay);
57 };
58
59 } // namespace ui
60
61 #endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_DISPLAY_H_
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/drm.gypi ('k') | ui/ozone/platform/drm/gpu/drm_display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698