OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef UI_OZONE_PLATFORM_DRI_DISPLAY_SNAPSHOT_DRI_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRI_DISPLAY_SNAPSHOT_DRI_H_ |
6 #define UI_OZONE_PLATFORM_DRI_DISPLAY_SNAPSHOT_DRI_H_ | 6 #define UI_OZONE_PLATFORM_DRI_DISPLAY_SNAPSHOT_DRI_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "ui/display/types/display_snapshot.h" | 9 #include "ui/display/types/display_snapshot.h" |
10 #include "ui/ozone/platform/dri/scoped_drm_types.h" | 10 #include "ui/ozone/platform/dri/scoped_drm_types.h" |
11 | 11 |
12 namespace ui { | 12 namespace ui { |
13 | 13 |
14 class DriWrapper; | 14 class DrmDevice; |
15 | 15 |
16 class DisplaySnapshotDri : public DisplaySnapshot { | 16 class DisplaySnapshotDri : public DisplaySnapshot { |
17 public: | 17 public: |
18 DisplaySnapshotDri(const scoped_refptr<DriWrapper>& drm, | 18 DisplaySnapshotDri(const scoped_refptr<DrmDevice>& drm, |
19 drmModeConnector* connector, | 19 drmModeConnector* connector, |
20 drmModeCrtc* crtc, | 20 drmModeCrtc* crtc, |
21 uint32_t index); | 21 uint32_t index); |
22 ~DisplaySnapshotDri() override; | 22 ~DisplaySnapshotDri() override; |
23 | 23 |
24 scoped_refptr<DriWrapper> drm() const { return drm_; } | 24 scoped_refptr<DrmDevice> drm() const { return drm_; } |
25 // Native properties of a display used by the DRI implementation in | 25 // Native properties of a display used by the DRI implementation in |
26 // configuring this display. | 26 // configuring this display. |
27 uint32_t connector() const { return connector_; } | 27 uint32_t connector() const { return connector_; } |
28 uint32_t crtc() const { return crtc_; } | 28 uint32_t crtc() const { return crtc_; } |
29 drmModePropertyRes* dpms_property() const { return dpms_property_.get(); } | 29 drmModePropertyRes* dpms_property() const { return dpms_property_.get(); } |
30 | 30 |
31 // DisplaySnapshot overrides: | 31 // DisplaySnapshot overrides: |
32 std::string ToString() const override; | 32 std::string ToString() const override; |
33 | 33 |
34 private: | 34 private: |
35 scoped_refptr<DriWrapper> drm_; | 35 scoped_refptr<DrmDevice> drm_; |
36 uint32_t connector_; | 36 uint32_t connector_; |
37 uint32_t crtc_; | 37 uint32_t crtc_; |
38 ScopedDrmPropertyPtr dpms_property_; | 38 ScopedDrmPropertyPtr dpms_property_; |
39 std::string name_; | 39 std::string name_; |
40 bool overscan_flag_; | 40 bool overscan_flag_; |
41 | 41 |
42 DISALLOW_COPY_AND_ASSIGN(DisplaySnapshotDri); | 42 DISALLOW_COPY_AND_ASSIGN(DisplaySnapshotDri); |
43 }; | 43 }; |
44 | 44 |
45 } // namespace ui | 45 } // namespace ui |
46 | 46 |
47 #endif // UI_OZONE_PLATFORM_DRI_DISPLAY_SNAPSHOT_DRI_H_ | 47 #endif // UI_OZONE_PLATFORM_DRI_DISPLAY_SNAPSHOT_DRI_H_ |
OLD | NEW |