Index: ui/ozone/platform/dri/ozone_platform_gbm.cc |
diff --git a/ui/ozone/platform/dri/ozone_platform_gbm.cc b/ui/ozone/platform/dri/ozone_platform_gbm.cc |
index 20f9450133b9f9acb03ec5ec33220795ca6006ab..a2f59e7c29f7284967e6482edd3b7cd6265f361e 100644 |
--- a/ui/ozone/platform/dri/ozone_platform_gbm.cc |
+++ b/ui/ozone/platform/dri/ozone_platform_gbm.cc |
@@ -19,6 +19,7 @@ |
#include "ui/ozone/platform/dri/dri_cursor.h" |
#include "ui/ozone/platform/dri/dri_gpu_platform_support.h" |
#include "ui/ozone/platform/dri/dri_gpu_platform_support_host.h" |
+#include "ui/ozone/platform/dri/dri_helper_thread.h" |
#include "ui/ozone/platform/dri/dri_window.h" |
#include "ui/ozone/platform/dri/dri_window_delegate_manager.h" |
#include "ui/ozone/platform/dri/dri_window_manager.h" |
@@ -148,8 +149,11 @@ class OzonePlatformGbm : public OzonePlatform { |
void InitializeGPU() override { |
gl_api_loader_.reset(new GlApiLoader()); |
+ if (use_surfaceless_) |
+ helper_thread_.reset(new DriHelperThread()); |
+ |
// Async page flips are supported only on surfaceless mode. |
- gbm_.reset(new GbmWrapper(kDefaultGraphicsCardPath, !use_surfaceless_)); |
+ gbm_.reset(new GbmWrapper(kDefaultGraphicsCardPath, helper_thread_.get())); |
gbm_->Initialize(); |
buffer_generator_.reset(new GbmBufferGenerator()); |
screen_manager_.reset( |
@@ -163,14 +167,15 @@ class OzonePlatformGbm : public OzonePlatform { |
scoped_ptr<NativeDisplayDelegateDri> ndd( |
new NativeDisplayDelegateDri(gbm_.get(), screen_manager_.get())); |
ndd->Initialize(); |
- gpu_platform_support_.reset( |
- new DriGpuPlatformSupport(gbm_.get(), window_delegate_manager_.get(), |
- screen_manager_.get(), ndd.Pass())); |
+ gpu_platform_support_.reset(new DriGpuPlatformSupport( |
+ gbm_.get(), window_delegate_manager_.get(), screen_manager_.get(), |
+ helper_thread_.get(), ndd.Pass())); |
} |
private: |
bool use_surfaceless_; |
scoped_ptr<GlApiLoader> gl_api_loader_; |
+ scoped_ptr<DriHelperThread> helper_thread_; |
scoped_ptr<GbmWrapper> gbm_; |
scoped_ptr<GbmBufferGenerator> buffer_generator_; |
scoped_ptr<ScreenManager> screen_manager_; |