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

Unified Diff: ui/ozone/platform/dri/dri_wrapper.h

Issue 856423002: [Ozone-Dri] Decouple the IO helper thread from DriWrapper (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gbm-wrapper
Patch Set: . Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: ui/ozone/platform/dri/dri_wrapper.h
diff --git a/ui/ozone/platform/dri/dri_wrapper.h b/ui/ozone/platform/dri/dri_wrapper.h
index 0dfa86691363cdc21a7fca32d84cc669ed4ef790..a989bca357496702efdef53ccb65fe150aa9b0be 100644
--- a/ui/ozone/platform/dri/dri_wrapper.h
+++ b/ui/ozone/platform/dri/dri_wrapper.h
@@ -27,6 +27,7 @@ struct SkImageInfo;
namespace ui {
class HardwareDisplayPlaneManager;
+class IOHelperThread;
// Wraps DRM calls into a nice interface. Used to provide different
// implementations of the DRM calls. For the actual implementation the DRM API
@@ -37,7 +38,10 @@ class DriWrapper {
unsigned int /* seconds */,
unsigned int /* useconds */)> PageFlipCallback;
- DriWrapper(const char* device_path, bool use_sync_flips);
+ // TODO(dnicoara) We should be passing a TaskRunner, however we cannot
+ // initialize the thread that early since the Ozone platform (and DriWrapper)
+ // is initializing before the sandbox.
+ DriWrapper(const char* device_path, IOHelperThread* io_thread);
virtual ~DriWrapper();
// Open device.
@@ -163,9 +167,6 @@ class DriWrapper {
scoped_ptr<HardwareDisplayPlaneManager> plane_manager_;
- // If we need to block when performing page flips this is set to true.
- bool use_sync_flips_;
-
private:
class IOWatcher;
@@ -175,7 +176,7 @@ class DriWrapper {
// Helper thread to perform IO listener operations.
// TODO(dnicoara) This should really be supported by the main thread.
// Alternatively we should have a way to access the IO thread's task runner.
- base::Thread io_thread_;
+ IOHelperThread* io_thread_;
// Watcher for |fd_| listening for page flip events.
scoped_refptr<IOWatcher> watcher_;

Powered by Google App Engine
This is Rietveld 408576698