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 9419ebc28ecc88bfee894996b0403861de1d715c..311d67b6d681767e24a578538360d82e085fce31 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"; |
| + int vgem_fd = open(kVgemPath, O_RDWR | O_CLOEXEC); |
|
dcheng
2015/08/21 14:44:06
base::ScopedFD vgem_fd(open(...));
dshwang
2015/08/21 18:38:37
Done.
|
| + DCHECK_GE(vgem_fd, 0) << "Failed to open: " << kVgemPath; |
|
dcheng
2015/08/21 14:44:06
DCHECK(vgem_fd.is_valid())
dshwang
2015/08/21 18:38:37
Done.
|
| + return base::ScopedFD(vgem_fd); |
|
dcheng
2015/08/21 14:44:06
return vgem_fd
dshwang
2015/08/21 18:38:37
Done.
|
| +#endif |
| + return base::ScopedFD(); |
| + } |
| void InitializeUI() override { |
| device_manager_ = CreateDeviceManager(); |
| window_manager_.reset(new DrmWindowHostManager()); |