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 cf1027db81fa012288d055406534fdebb8202040..a5ba3475d0c8bdf1aff485b34fa63335df3300b9 100644 |
--- a/ui/ozone/platform/dri/ozone_platform_gbm.cc |
+++ b/ui/ozone/platform/dri/ozone_platform_gbm.cc |
@@ -127,7 +127,8 @@ class OzonePlatformGbm : public OzonePlatform { |
vt_manager_.reset(new VirtualTerminalManager()); |
// Needed since the browser process creates the accelerated widgets and that |
// happens through SFO. |
- surface_factory_ozone_.reset(new GbmSurfaceFactory(use_surfaceless_)); |
+ if (!surface_factory_ozone_) |
+ surface_factory_ozone_.reset(new GbmSurfaceFactory(use_surfaceless_)); |
device_manager_ = CreateDeviceManager(); |
gpu_platform_support_host_.reset(new GpuPlatformSupportHostGbm()); |
cursor_factory_ozone_.reset(new BitmapCursorFactoryOzone); |