| 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> |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 class OZONE_EXPORT DriWrapper : public base::RefCountedThreadSafe<DriWrapper> { | 41 class OZONE_EXPORT DriWrapper : public base::RefCountedThreadSafe<DriWrapper> { |
| 42 public: | 42 public: |
| 43 typedef base::Callback<void(unsigned int /* frame */, | 43 typedef base::Callback<void(unsigned int /* frame */, |
| 44 unsigned int /* seconds */, | 44 unsigned int /* seconds */, |
| 45 unsigned int /* useconds */)> PageFlipCallback; | 45 unsigned int /* useconds */)> PageFlipCallback; |
| 46 | 46 |
| 47 DriWrapper(const base::FilePath& device_path); | 47 DriWrapper(const base::FilePath& device_path); |
| 48 DriWrapper(const base::FilePath& device_path, base::File file); | 48 DriWrapper(const base::FilePath& device_path, base::File file); |
| 49 | 49 |
| 50 // Open device. | 50 // Open device. |
| 51 virtual void Initialize(); | 51 virtual bool Initialize(); |
| 52 | 52 |
| 53 // |task_runner| will be used to asynchronously page flip. | 53 // |task_runner| will be used to asynchronously page flip. |
| 54 virtual void InitializeTaskRunner( | 54 virtual void InitializeTaskRunner( |
| 55 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner); | 55 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner); |
| 56 | 56 |
| 57 // Get the CRTC state. This is generally used to save state before using the | 57 // Get the CRTC state. This is generally used to save state before using the |
| 58 // CRTC. When the user finishes using the CRTC, the user should restore the | 58 // CRTC. When the user finishes using the CRTC, the user should restore the |
| 59 // CRTC to it's initial state. Use |SetCrtc| to restore the state. | 59 // CRTC to it's initial state. Use |SetCrtc| to restore the state. |
| 60 virtual ScopedDrmCrtcPtr GetCrtc(uint32_t crtc_id); | 60 virtual ScopedDrmCrtcPtr GetCrtc(uint32_t crtc_id); |
| 61 | 61 |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 | 185 |
| 186 // Watcher for |fd_| listening for page flip events. | 186 // Watcher for |fd_| listening for page flip events. |
| 187 scoped_refptr<IOWatcher> watcher_; | 187 scoped_refptr<IOWatcher> watcher_; |
| 188 | 188 |
| 189 DISALLOW_COPY_AND_ASSIGN(DriWrapper); | 189 DISALLOW_COPY_AND_ASSIGN(DriWrapper); |
| 190 }; | 190 }; |
| 191 | 191 |
| 192 } // namespace ui | 192 } // namespace ui |
| 193 | 193 |
| 194 #endif // UI_OZONE_PLATFORM_DRI_DRI_WRAPPER_H_ | 194 #endif // UI_OZONE_PLATFORM_DRI_DRI_WRAPPER_H_ |
| OLD | NEW |