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

Unified Diff: ui/ozone/platform/drm/ozone_platform_gbm.cc

Issue 1248713002: ozone: ClientPixmapManager passes VGEM fd from browser to renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove redundant Pass() Created 5 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/drm/ozone_platform_drm.cc ('k') | ui/ozone/platform/egltest/ozone_platform_egltest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..e321daeff227ddfe6a0127f8e870783e4c43d989 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;
+#endif
+ return base::ScopedFD();
+ }
void InitializeUI() override {
device_manager_ = CreateDeviceManager();
window_manager_.reset(new DrmWindowHostManager());
« no previous file with comments | « ui/ozone/platform/drm/ozone_platform_drm.cc ('k') | ui/ozone/platform/egltest/ozone_platform_egltest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698