| 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_DRI_WRAPPER_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRI_DRI_WRAPPER_H_ |
| 6 #define UI_OZONE_PLATFORM_DRI_DRI_WRAPPER_H_ | 6 #define UI_OZONE_PLATFORM_DRI_DRI_WRAPPER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/memory/scoped_vector.h" | 14 #include "base/memory/scoped_vector.h" |
| 15 #include "ui/gfx/geometry/rect.h" | 15 #include "ui/gfx/geometry/rect.h" |
| 16 #include "ui/gfx/geometry/rect_f.h" | 16 #include "ui/gfx/geometry/rect_f.h" |
| 17 #include "ui/gfx/overlay_transform.h" | 17 #include "ui/gfx/overlay_transform.h" |
| 18 #include "ui/ozone/ozone_export.h" |
| 18 #include "ui/ozone/platform/dri/hardware_display_plane_manager.h" | 19 #include "ui/ozone/platform/dri/hardware_display_plane_manager.h" |
| 19 #include "ui/ozone/platform/dri/scoped_drm_types.h" | 20 #include "ui/ozone/platform/dri/scoped_drm_types.h" |
| 20 | 21 |
| 21 typedef struct _drmEventContext drmEventContext; | 22 typedef struct _drmEventContext drmEventContext; |
| 22 typedef struct _drmModeModeInfo drmModeModeInfo; | 23 typedef struct _drmModeModeInfo drmModeModeInfo; |
| 23 | 24 |
| 24 struct SkImageInfo; | 25 struct SkImageInfo; |
| 25 | 26 |
| 26 namespace base { | 27 namespace base { |
| 27 class SingleThreadTaskRunner; | 28 class SingleThreadTaskRunner; |
| 28 } // namespace base | 29 } // namespace base |
| 29 | 30 |
| 30 namespace ui { | 31 namespace ui { |
| 31 | 32 |
| 32 class HardwareDisplayPlaneManager; | 33 class HardwareDisplayPlaneManager; |
| 33 | 34 |
| 34 // Wraps DRM calls into a nice interface. Used to provide different | 35 // Wraps DRM calls into a nice interface. Used to provide different |
| 35 // implementations of the DRM calls. For the actual implementation the DRM API | 36 // implementations of the DRM calls. For the actual implementation the DRM API |
| 36 // would be called. In unit tests this interface would be stubbed. | 37 // would be called. In unit tests this interface would be stubbed. |
| 37 class DriWrapper { | 38 class OZONE_EXPORT DriWrapper { |
| 38 public: | 39 public: |
| 39 typedef base::Callback<void(unsigned int /* frame */, | 40 typedef base::Callback<void(unsigned int /* frame */, |
| 40 unsigned int /* seconds */, | 41 unsigned int /* seconds */, |
| 41 unsigned int /* useconds */)> PageFlipCallback; | 42 unsigned int /* useconds */)> PageFlipCallback; |
| 42 | 43 |
| 43 DriWrapper(const char* device_path); | 44 DriWrapper(const char* device_path); |
| 44 virtual ~DriWrapper(); | 45 virtual ~DriWrapper(); |
| 45 | 46 |
| 46 // Open device. | 47 // Open device. |
| 47 virtual void Initialize(); | 48 virtual void Initialize(); |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 | 178 |
| 178 // Watcher for |fd_| listening for page flip events. | 179 // Watcher for |fd_| listening for page flip events. |
| 179 scoped_refptr<IOWatcher> watcher_; | 180 scoped_refptr<IOWatcher> watcher_; |
| 180 | 181 |
| 181 DISALLOW_COPY_AND_ASSIGN(DriWrapper); | 182 DISALLOW_COPY_AND_ASSIGN(DriWrapper); |
| 182 }; | 183 }; |
| 183 | 184 |
| 184 } // namespace ui | 185 } // namespace ui |
| 185 | 186 |
| 186 #endif // UI_OZONE_PLATFORM_DRI_DRI_WRAPPER_H_ | 187 #endif // UI_OZONE_PLATFORM_DRI_DRI_WRAPPER_H_ |
| OLD | NEW |