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 6f1d18330fbcaddf668756ba128852c3ccb34ca2..6e354b8b8a21c25e4808dc4e9a38ea13d4ab24bb 100644 |
--- a/ui/ozone/platform/dri/gbm_surface_factory.cc |
+++ b/ui/ozone/platform/dri/gbm_surface_factory.cc |
@@ -97,19 +97,21 @@ 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::CreateSurfacelessEGLSurfaceForWidget( |
+ 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( |