| 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_CRTC_CONTROLLER_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRI_CRTC_CONTROLLER_H_ |
| 6 #define UI_OZONE_PLATFORM_DRI_CRTC_CONTROLLER_H_ | 6 #define UI_OZONE_PLATFORM_DRI_CRTC_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 #include <xf86drmMode.h> | 10 #include <xf86drmMode.h> |
| 11 | 11 |
| 12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 13 #include "base/observer_list.h" | 13 #include "base/observer_list.h" |
| 14 #include "ui/ozone/ozone_export.h" |
| 14 #include "ui/ozone/platform/dri/hardware_display_plane_manager.h" | 15 #include "ui/ozone/platform/dri/hardware_display_plane_manager.h" |
| 15 #include "ui/ozone/platform/dri/overlay_plane.h" | 16 #include "ui/ozone/platform/dri/overlay_plane.h" |
| 16 #include "ui/ozone/platform/dri/scoped_drm_types.h" | 17 #include "ui/ozone/platform/dri/scoped_drm_types.h" |
| 17 | 18 |
| 18 namespace ui { | 19 namespace ui { |
| 19 | 20 |
| 20 class DriWrapper; | 21 class DriWrapper; |
| 21 class PageFlipObserver; | 22 class PageFlipObserver; |
| 22 | 23 |
| 23 // Wrapper around a CRTC. | 24 // Wrapper around a CRTC. |
| 24 // | 25 // |
| 25 // One CRTC can be paired up with one or more connectors. The simplest | 26 // One CRTC can be paired up with one or more connectors. The simplest |
| 26 // configuration represents one CRTC driving one monitor, while pairing up a | 27 // configuration represents one CRTC driving one monitor, while pairing up a |
| 27 // CRTC with multiple connectors results in hardware mirroring. | 28 // CRTC with multiple connectors results in hardware mirroring. |
| 28 class CrtcController : public base::SupportsWeakPtr<CrtcController> { | 29 class OZONE_EXPORT CrtcController |
| 30 : public base::SupportsWeakPtr<CrtcController> { |
| 29 public: | 31 public: |
| 30 CrtcController(DriWrapper* drm, uint32_t crtc, uint32_t connector); | 32 CrtcController(DriWrapper* drm, uint32_t crtc, uint32_t connector); |
| 31 ~CrtcController(); | 33 ~CrtcController(); |
| 32 | 34 |
| 33 uint32_t crtc() const { return crtc_; } | 35 uint32_t crtc() const { return crtc_; } |
| 34 uint32_t connector() const { return connector_; } | 36 uint32_t connector() const { return connector_; } |
| 35 DriWrapper* drm() const { return drm_; } | 37 DriWrapper* drm() const { return drm_; } |
| 36 bool is_disabled() const { return is_disabled_; } | 38 bool is_disabled() const { return is_disabled_; } |
| 37 bool page_flip_pending() const { return page_flip_pending_; } | 39 bool page_flip_pending() const { return page_flip_pending_; } |
| 38 uint64_t time_of_last_flip() const { return time_of_last_flip_; } | 40 uint64_t time_of_last_flip() const { return time_of_last_flip_; } |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 uint64_t time_of_last_flip_; | 106 uint64_t time_of_last_flip_; |
| 105 | 107 |
| 106 ObserverList<PageFlipObserver> observers_; | 108 ObserverList<PageFlipObserver> observers_; |
| 107 | 109 |
| 108 DISALLOW_COPY_AND_ASSIGN(CrtcController); | 110 DISALLOW_COPY_AND_ASSIGN(CrtcController); |
| 109 }; | 111 }; |
| 110 | 112 |
| 111 } // namespace ui | 113 } // namespace ui |
| 112 | 114 |
| 113 #endif // UI_OZONE_PLATFORM_DRI_CRTC_CONTROLLER_H_ | 115 #endif // UI_OZONE_PLATFORM_DRI_CRTC_CONTROLLER_H_ |
| OLD | NEW |