OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/ozone/platform/drm/ozone_platform_gbm.h" | 5 #include "ui/ozone/platform/drm/ozone_platform_gbm.h" |
6 | 6 |
7 #include <dlfcn.h> | 7 #include <dlfcn.h> |
8 #include <gbm.h> | 8 #include <gbm.h> |
9 #include <stdlib.h> | 9 #include <stdlib.h> |
10 | 10 |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 XkbEvdevCodes xkb_evdev_code_converter_; | 219 XkbEvdevCodes xkb_evdev_code_converter_; |
220 #endif | 220 #endif |
221 | 221 |
222 DISALLOW_COPY_AND_ASSIGN(OzonePlatformGbm); | 222 DISALLOW_COPY_AND_ASSIGN(OzonePlatformGbm); |
223 }; | 223 }; |
224 | 224 |
225 } // namespace | 225 } // namespace |
226 | 226 |
227 OzonePlatform* CreateOzonePlatformGbm() { | 227 OzonePlatform* CreateOzonePlatformGbm() { |
228 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); | 228 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); |
229 #if defined(USE_MESA_PLATFORM_NULL) | 229 // Always go surfaceless. |
230 // Only works with surfaceless. | |
231 cmd->AppendSwitch(switches::kOzoneUseSurfaceless); | 230 cmd->AppendSwitch(switches::kOzoneUseSurfaceless); |
232 #endif | |
233 return new OzonePlatformGbm(cmd->HasSwitch(switches::kOzoneUseSurfaceless)); | 231 return new OzonePlatformGbm(cmd->HasSwitch(switches::kOzoneUseSurfaceless)); |
234 } | 232 } |
235 | 233 |
236 } // namespace ui | 234 } // namespace ui |
OLD | NEW |