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

Unified Diff: content/common/gpu/media/vaapi_wrapper.cc

Issue 1073653003: [Ozone] VAAPI wrapper should open its own render node. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 | « content/common/gpu/media/vaapi_wrapper.h ('k') | content/common/sandbox_linux/bpf_gpu_policy_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/media/vaapi_wrapper.cc
diff --git a/content/common/gpu/media/vaapi_wrapper.cc b/content/common/gpu/media/vaapi_wrapper.cc
index c267af50bd4cd9ae4cedb77c6cd575d752d88539..01119d093c24e07aecf594f08588b265f27f30b4 100644
--- a/content/common/gpu/media/vaapi_wrapper.cc
+++ b/content/common/gpu/media/vaapi_wrapper.cc
@@ -291,10 +291,11 @@ bool VaapiWrapper::VaInitialize(const base::Closure& report_error_to_uma_cb) {
#if defined(USE_X11)
va_display_ = vaGetDisplay(gfx::GetXDisplay());
#elif defined(USE_OZONE)
- ui::OzonePlatform* platform = ui::OzonePlatform::GetInstance();
- ui::SurfaceFactoryOzone* factory = platform->GetSurfaceFactoryOzone();
-
- va_display_ = vaGetDisplayDRM(factory->GetDrmFd());
+ const char* kDriRenderNode0Path = "/dev/dri/renderD128";
Pawel Osciak 2015/04/08 23:39:20 I don't see this node on BYT or HSW for example...
+ drm_file_ = base::File(base::FilePath::FromUTF8Unsafe(kDriRenderNode0Path),
+ base::File::FLAG_OPEN | base::File::FLAG_READ |
+ base::File::FLAG_WRITE);
+ va_display_ = vaGetDisplayDRM(drm_file_.GetPlatformFile());
#endif // USE_X11
if (!vaDisplayIsValid(va_display_)) {
« no previous file with comments | « content/common/gpu/media/vaapi_wrapper.h ('k') | content/common/sandbox_linux/bpf_gpu_policy_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698