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

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

Issue 10829182: Only dlopen() OMX/VAAPI libs in the GPU process, and only lazily dlsym() their symbols. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
Index: content/common/gpu/media/vaapi_video_decode_accelerator.h
diff --git a/content/common/gpu/media/vaapi_video_decode_accelerator.h b/content/common/gpu/media/vaapi_video_decode_accelerator.h
index 64a94d885780931bffef989a19b05b458006a200..65ef59f728fc7caf3101fe5e3c10bb63bf3d7a75 100644
--- a/content/common/gpu/media/vaapi_video_decode_accelerator.h
+++ b/content/common/gpu/media/vaapi_video_decode_accelerator.h
@@ -56,7 +56,10 @@ class CONTENT_EXPORT VaapiVideoDecodeAccelerator :
virtual void Reset() OVERRIDE;
virtual void Destroy() OVERRIDE;
- private:
+ // Do any necessary initialization before the sandbox is enabled.
+ static void PreSandboxInitialization();
+
+private:
// Ensure data has been synced with the output texture and notify
// the client it is ready for displaying.
void SyncAndNotifyPictureReady(int32 input_id, int32 output_id);
@@ -121,6 +124,10 @@ class CONTENT_EXPORT VaapiVideoDecodeAccelerator :
// Helper for Destroy(), doing all the actual work except for deleting self.
void Cleanup();
+ // Lazily initialize static data after sandbox is enabled. Return false on
+ // init failure.
+ static bool PostSandboxInitialization();
+
// Client-provided X/GLX state.
Display* x_display_;
GLXContext glx_context_;
@@ -195,6 +202,9 @@ class CONTENT_EXPORT VaapiVideoDecodeAccelerator :
base::Thread decoder_thread_;
content::VaapiH264Decoder decoder_;
+ // Has static initialization of pre-sandbox components completed successfully?
+ static bool pre_sandbox_init_done_;
+
// Callback passed to the decoder, which it will use to signal readiness
// of an output picture to be displayed.
void OutputPicCallback(int32 input_id, int32 output_id);

Powered by Google App Engine
This is Rietveld 408576698