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 b23b2d49d932c30b2533f8fcfceba8051d7a7d3d..2a10ed71a1c26541010ce70a7897366de3ab4322 100644 |
--- a/ui/ozone/platform/dri/ozone_platform_gbm.cc |
+++ b/ui/ozone/platform/dri/ozone_platform_gbm.cc |
@@ -130,7 +130,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); |