Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(757)

Unified Diff: ui/ozone/platform/dri/gbm_surface_factory.cc

Issue 433543002: Add a new ozone switch to enable surfaceless output mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: re-rebase Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/ozone/platform/dri/gbm_surface_factory.h ('k') | ui/ozone/platform/dri/ozone_platform_gbm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « ui/ozone/platform/dri/gbm_surface_factory.h ('k') | ui/ozone/platform/dri/ozone_platform_gbm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698