Index: ui/ozone/platform/dri/gbm_surface_factory.cc |
diff --git a/ui/ozone/platform/dri/gbm_surface_factory.cc b/ui/ozone/platform/dri/gbm_surface_factory.cc |
index 1920cc662c68a8d90687f510b092567e9b6f8237..bab30ff11a6de6db523ab1cf11d22ca575d7f366 100644 |
--- a/ui/ozone/platform/dri/gbm_surface_factory.cc |
+++ b/ui/ozone/platform/dri/gbm_surface_factory.cc |
@@ -97,19 +97,22 @@ scoped_ptr<SurfaceOzoneEGL> GbmSurfaceFactory::CreateEGLSurfaceForWidget( |
DCHECK(state_ == INITIALIZED); |
ResetCursor(widget); |
- if (allow_surfaceless_) { |
- return scoped_ptr<SurfaceOzoneEGL>( |
- new GbmSurfaceless(screen_manager_->GetDisplayController(widget))); |
- } else { |
- scoped_ptr<GbmSurface> surface( |
- new GbmSurface(screen_manager_->GetDisplayController(widget), |
- device_, |
- drm_)); |
- if (!surface->Initialize()) |
- return scoped_ptr<SurfaceOzoneEGL>(); |
- |
- return surface.PassAs<SurfaceOzoneEGL>(); |
- } |
+ scoped_ptr<GbmSurface> surface( |
+ new GbmSurface(screen_manager_->GetDisplayController(widget), |
+ device_, |
+ drm_)); |
+ if (!surface->Initialize()) |
+ return scoped_ptr<SurfaceOzoneEGL>(); |
+ |
+ return surface.PassAs<SurfaceOzoneEGL>(); |
+} |
+ |
+scoped_ptr<SurfaceOzoneEGL> GbmSurfaceFactory::CreateEmptyEGLSurfaceForWidget( |
+ gfx::AcceleratedWidget widget) { |
+ if (!allow_surfaceless_) |
+ return scoped_ptr<SurfaceOzoneEGL>(); |
+ return scoped_ptr<SurfaceOzoneEGL>( |
+ new GbmSurfaceless(screen_manager_->GetDisplayController(widget))); |
} |
scoped_refptr<ui::NativePixmap> GbmSurfaceFactory::CreateNativePixmap( |