| 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..381459ee7e0b3476ec14f3e569ac9ab14dffc803 100644
|
| --- a/ui/ozone/platform/dri/dri_wrapper.h
|
| +++ b/ui/ozone/platform/dri/dri_wrapper.h
|
| @@ -12,7 +12,6 @@
|
| #include "base/callback.h"
|
| #include "base/macros.h"
|
| #include "base/memory/scoped_vector.h"
|
| -#include "base/threading/thread.h"
|
| #include "ui/gfx/geometry/rect.h"
|
| #include "ui/gfx/geometry/rect_f.h"
|
| #include "ui/gfx/overlay_transform.h"
|
| @@ -24,6 +23,10 @@ typedef struct _drmModeModeInfo drmModeModeInfo;
|
|
|
| struct SkImageInfo;
|
|
|
| +namespace base {
|
| +class SingleThreadTaskRunner;
|
| +} // namespace base
|
| +
|
| namespace ui {
|
|
|
| class HardwareDisplayPlaneManager;
|
| @@ -37,12 +40,16 @@ class DriWrapper {
|
| unsigned int /* seconds */,
|
| unsigned int /* useconds */)> PageFlipCallback;
|
|
|
| - DriWrapper(const char* device_path, bool use_sync_flips);
|
| + DriWrapper(const char* device_path);
|
| virtual ~DriWrapper();
|
|
|
| // Open device.
|
| virtual void Initialize();
|
|
|
| + // |task_runner| will be used to asynchronously page flip.
|
| + virtual void InitializeTaskRunner(
|
| + const scoped_refptr<base::SingleThreadTaskRunner>& task_runner);
|
| +
|
| // Get the CRTC state. This is generally used to save state before using the
|
| // CRTC. When the user finishes using the CRTC, the user should restore the
|
| // CRTC to it's initial state. Use |SetCrtc| to restore the state.
|
| @@ -152,10 +159,6 @@ class DriWrapper {
|
| HardwareDisplayPlaneManager* plane_manager() { return plane_manager_.get(); }
|
|
|
| protected:
|
| - // Responsible for late initialization of the IO thread. This needs to happen
|
| - // after the sandbox is up, thus the late initialization.
|
| - virtual void InitializeIOWatcher();
|
| -
|
| // The file descriptor associated with this wrapper. All DRM operations will
|
| // be performed using this FD.
|
| // TODO(dnicoara) Make this a base::File
|
| @@ -163,9 +166,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;
|
|
|
| @@ -173,9 +173,7 @@ class DriWrapper {
|
| const char* device_path_;
|
|
|
| // 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_;
|
| + scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
|
|
|
| // Watcher for |fd_| listening for page flip events.
|
| scoped_refptr<IOWatcher> watcher_;
|
|
|