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
3 // found in the LICENSE file.
5 #ifndef UI_OZONE_PLATFORM_DRM_GPU_DRM_DISPLAY_SNAPSHOT_H_
6 #define UI_OZONE_PLATFORM_DRM_GPU_DRM_DISPLAY_SNAPSHOT_H_
8 #include "base/memory/ref_counted.h"
9 #include "ui/display/types/display_snapshot.h"
10 #include "ui/ozone/platform/drm/gpu/scoped_drm_types.h"
16 class DrmDisplaySnapshot
: public DisplaySnapshot
{
18 DrmDisplaySnapshot(const scoped_refptr
<DrmDevice
>& drm
,
19 drmModeConnector
* connector
,
22 ~DrmDisplaySnapshot() override
;
24 scoped_refptr
<DrmDevice
> drm() const { return drm_
; }
25 // Native properties of a display used by the DRM implementation in
26 // configuring this display.
27 uint32_t connector() const { return connector_
; }
28 uint32_t crtc() const { return crtc_
; }
29 drmModePropertyRes
* dpms_property() const { return dpms_property_
.get(); }
31 // DisplaySnapshot overrides:
32 std::string
ToString() const override
;
35 scoped_refptr
<DrmDevice
> drm_
;
38 ScopedDrmPropertyPtr dpms_property_
;
42 DISALLOW_COPY_AND_ASSIGN(DrmDisplaySnapshot
);
47 #endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_DISPLAY_SNAPSHOT_H_