Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Side by Side Diff: ui/ozone/platform/dri/dri_wrapper.h

Issue 956563004: [Ozone-Dri] Gracefully handle DRM devices with no resources (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2311
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ui/ozone/platform/dri/dri_wrapper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | ui/ozone/platform/dri/dri_wrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698