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

Unified Diff: ui/ozone/platform/dri/ozone_platform_gbm.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.cc ('k') | ui/ozone/public/ozone_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3b417c205b64db4ff9a4668c42be4edfb906443d..6dd4c153e4bc07124c3849244bd3a19128da9960 100644
--- a/ui/ozone/platform/dri/ozone_platform_gbm.cc
+++ b/ui/ozone/platform/dri/ozone_platform_gbm.cc
@@ -9,6 +9,7 @@
#include <stdlib.h>
#include "base/at_exit.h"
+#include "base/command_line.h"
#include "ui/events/ozone/device/device_manager.h"
#include "ui/events/ozone/evdev/event_factory_evdev.h"
#include "ui/ozone/platform/dri/cursor_factory_evdev_dri.h"
@@ -26,6 +27,7 @@
#include "ui/ozone/public/gpu_platform_support.h"
#include "ui/ozone/public/gpu_platform_support_host.h"
#include "ui/ozone/public/ozone_platform.h"
+#include "ui/ozone/public/ozone_switches.h"
#if defined(OS_CHROMEOS)
#include "ui/ozone/common/chromeos/touchscreen_device_manager_ozone.h"
@@ -173,10 +175,8 @@ class OzonePlatformGbm : public OzonePlatform {
} // namespace
OzonePlatform* CreateOzonePlatformGbm() {
- return new OzonePlatformGbm(false);
-}
-OzonePlatform* CreateOzonePlatformGbmEglImage() {
- return new OzonePlatformGbm(true);
+ CommandLine* cmd = CommandLine::ForCurrentProcess();
+ return new OzonePlatformGbm(cmd->HasSwitch(switches::kOzoneUseSurfaceless));
}
} // namespace ui
« no previous file with comments | « ui/ozone/platform/dri/gbm_surface_factory.cc ('k') | ui/ozone/public/ozone_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698