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. 4 5 #ifndef UI_OZONE_PLATFORM_DRI_CHROMEOS_DISPLAY_SNAPSHOT_DRI_H_ 6 #define UI_OZONE_PLATFORM_DRI_CHROMEOS_DISPLAY_SNAPSHOT_DRI_H_ 7 8 #include "ui/display/types/chromeos/display_snapshot.h" 9 10 typedef struct _drmModeConnector drmModeConnector; 11 typedef struct _drmModeCrtc drmModeCrtc; 12 typedef struct _drmModeProperty drmModePropertyRes; 13 14 namespace ui { 15 16 class DriWrapper; 17 18 class DisplaySnapshotDri : public DisplaySnapshot { 19 public: 20 DisplaySnapshotDri(DriWrapper* drm, 21 drmModeConnector* connector, 22 drmModeCrtc* crtc, 23 uint32_t index); 24 virtual ~DisplaySnapshotDri(); 25 26 // Native properties of a display used by the DRI implementation in 27 // configuring this display. 28 uint32_t connector() const { return connector_; } 29 uint32_t crtc() const { return crtc_; } 30 drmModePropertyRes* dpms_property() const { return dpms_property_; } 31 32 // DisplaySnapshot overrides: 33 virtual std::string ToString() const OVERRIDE; 34 35 private: 36 uint32_t connector_; 37 uint32_t crtc_; 38 drmModePropertyRes* dpms_property_; 39 std::string name_; 40 bool overscan_flag_; 41 42 DISALLOW_COPY_AND_ASSIGN(DisplaySnapshotDri); 43 }; 44 45 } // namespace ui 46 47 #endif // UI_OZONE_PLATFORM_DRI_CHROMEOS_DISPLAY_SNAPSHOT_DRI_H_ 48