Chromium Code Reviews| Index: ui/ozone/platform/drm/ozone_platform_gbm.cc |
| diff --git a/ui/ozone/platform/drm/ozone_platform_gbm.cc b/ui/ozone/platform/drm/ozone_platform_gbm.cc |
| index 5f125b35d1de46ace1468c57edd62c19e2c3e277..b1efad0fa6a34b3fc144d5e6c4a21820d8d8a2e7 100644 |
| --- a/ui/ozone/platform/drm/ozone_platform_gbm.cc |
| +++ b/ui/ozone/platform/drm/ozone_platform_gbm.cc |
| @@ -46,6 +46,10 @@ |
| #include "ui/events/ozone/layout/stub/stub_keyboard_layout_engine.h" |
| #endif |
| +#if defined(USE_VGEM_MAP) |
| +#include <fcntl.h> |
| +#endif |
| + |
| namespace ui { |
| namespace { |
| @@ -149,6 +153,15 @@ class OzonePlatformGbm : public OzonePlatform { |
| return make_scoped_ptr( |
| new DrmNativeDisplayDelegate(display_manager_.get())); |
| } |
| + base::ScopedFD OpenClientNativePixmapDevice() const override { |
| +#if defined(USE_VGEM_MAP) |
| + static const char kVgemPath[] = "/dev/dri/renderD129"; |
| + base::ScopedFD vgem_fd(open(kVgemPath, O_RDWR | O_CLOEXEC)); |
| + DCHECK(vgem_fd.is_valid()) << "Failed to open: " << kVgemPath; |
| + return vgem_fd.Pass(); |
|
dcheng
2015/08/31 17:40:53
Pass() here is also unnecessary (NRVO applies)
dshwang
2015/08/31 18:12:29
Done.
|
| +#endif |
| + return base::ScopedFD(); |
| + } |
| void InitializeUI() override { |
| device_manager_ = CreateDeviceManager(); |
| window_manager_.reset(new DrmWindowHostManager()); |