blob: fd8c813f4b3ed3b1e08389d604617e4db7d83fe9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef UI_OZONE_PLATFORM_DRM_GPU_DRM_DISPLAY_H_
#define UI_OZONE_PLATFORM_DRM_GPU_DRM_DISPLAY_H_
#include <vector>
#include "base/memory/ref_counted.h"
#include "ui/display/types/display_constants.h"
#include "ui/gfx/geometry/point.h"
#include "ui/ozone/common/gpu/ozone_gpu_message_params.h"
typedef struct _drmModeModeInfo drmModeModeInfo;
namespace ui {
class DrmDevice;
class HardwareDisplayControllerInfo;
class ScreenManager;
struct GammaRampRGBEntry;
class DrmDisplay {
public:
DrmDisplay(ScreenManager* screen_manager,
const scoped_refptr<DrmDevice>& drm);
~DrmDisplay();
int64_t display_id() const { return display_id_; }
scoped_refptr<DrmDevice> drm() const { return drm_; }
uint32_t crtc() const { return crtc_; }
uint32_t connector() const { return connector_; }
const std::vector<drmModeModeInfo>& modes() const { return modes_; }
DisplaySnapshot_Params Update(HardwareDisplayControllerInfo* info,
size_t display_index);
bool Configure(const drmModeModeInfo* mode, const gfx::Point& origin);
bool GetHDCPState(HDCPState* state);
bool SetHDCPState(HDCPState state);
void SetGammaRamp(const std::vector<GammaRampRGBEntry>& lut);
private:
ScreenManager* screen_manager_; // Not owned.
int64_t display_id_;
scoped_refptr<DrmDevice> drm_;
uint32_t crtc_;
uint32_t connector_;
std::vector<drmModeModeInfo> modes_;
gfx::Point origin_;
DISALLOW_COPY_AND_ASSIGN(DrmDisplay);
};
} // namespace ui
#endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_DISPLAY_H_
|