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

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

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 #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 #include "ui/gfx/geometry/point.h"
13 #include "ui/ozone/common/gpu/ozone_gpu_message_params.h"
14
15 typedef struct _drmModeModeInfo drmModeModeInfo;
16
17 namespace ui {
18
19 class DrmDevice;
20 class HardwareDisplayControllerInfo;
21 class ScreenManager;
22
23 struct GammaRampRGBEntry;
24
25 class DrmDisplay {
26 public:
27 DrmDisplay(ScreenManager* screen_manager,
28 const scoped_refptr<DrmDevice>& drm);
29 ~DrmDisplay();
30
31 int64_t display_id() const { return display_id_; }
32 scoped_refptr<DrmDevice> drm() const { return drm_; }
33 uint32_t crtc() const { return crtc_; }
34 uint32_t connector() const { return connector_; }
35 const std::vector<drmModeModeInfo>& modes() const { return modes_; }
36
37 DisplaySnapshot_Params Update(HardwareDisplayControllerInfo* info,
38 size_t display_index);
39
40 bool Configure(const drmModeModeInfo* mode, const gfx::Point& origin);
41 bool GetHDCPState(HDCPState* state);
42 bool SetHDCPState(HDCPState state);
43 void SetGammaRamp(const std::vector<GammaRampRGBEntry>& lut);
44
45 private:
46 ScreenManager* screen_manager_; // Not owned.
47
48 int64_t display_id_ = -1;
49 scoped_refptr<DrmDevice> drm_;
50 uint32_t crtc_ = 0;
51 uint32_t connector_ = 0;
52 std::vector<drmModeModeInfo> modes_;
53 gfx::Point origin_;
54
55 DISALLOW_COPY_AND_ASSIGN(DrmDisplay);
56 };
57
58 } // namespace ui
59
60 #endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_DISPLAY_H_
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_device_manager.cc ('k') | ui/ozone/platform/drm/gpu/drm_display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698