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

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

Issue 1137483002: VAAPI Wrapper: refactor management of drm file (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 | « no previous file | content/common/gpu/media/vaapi_wrapper.cc » ('j') | content/common/gpu/media/vaapi_wrapper.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/media/vaapi_wrapper.h
diff --git a/content/common/gpu/media/vaapi_wrapper.h b/content/common/gpu/media/vaapi_wrapper.h
index cd2d2a6d8fa14b8e54b348690c4522c115895307..cb547e9e311c160f72a52f0da2a91d94c1c82fad 100644
--- a/content/common/gpu/media/vaapi_wrapper.h
+++ b/content/common/gpu/media/vaapi_wrapper.h
@@ -191,6 +191,9 @@ class CONTENT_EXPORT VaapiWrapper {
VASurfaceID va_surface_id_dest,
const gfx::Size& dest_size);
+ // Initialize static data before sandbox is enabled.
+ static void PreSandboxInitialization();
+
private:
struct ProfileInfo {
VAProfile va_profile;
@@ -309,8 +312,9 @@ class CONTENT_EXPORT VaapiWrapper {
VABufferID va_vpp_buffer_id_;
#if defined(USE_OZONE)
- // Drm file used to obtain access to the driver interface by VA.
- base::File drm_file_;
+ // Singleton variable to store drm file used to obtain access to the driver
+ // interface by VA.
+ static base::LazyInstance<base::File> drm_file_;
dnicoara 2015/05/07 21:17:10 You use base::ScopedFD rather than base::File for
hshi1 2015/05/07 21:50:17 Done.
#endif // USE_OZONE
// Singleton variable to store supported profile information for encode and
« no previous file with comments | « no previous file | content/common/gpu/media/vaapi_wrapper.cc » ('j') | content/common/gpu/media/vaapi_wrapper.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698