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

Unified Diff: media/gpu/vaapi_wrapper.h

Issue 2668813002: Remove LazyInstance usage from media/ (Closed)
Patch Set: Fix presubmit comments. Created 3 years, 10 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 | « media/gpu/tegra_v4l2_device.cc ('k') | media/gpu/vaapi_wrapper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/gpu/vaapi_wrapper.h
diff --git a/media/gpu/vaapi_wrapper.h b/media/gpu/vaapi_wrapper.h
index 16efa2d644efe3bd0aa9eb89c75171506048bce3..6308f426634a072c42a65b115abe72d98ae9fad1 100644
--- a/media/gpu/vaapi_wrapper.h
+++ b/media/gpu/vaapi_wrapper.h
@@ -17,7 +17,6 @@
#include <vector>
#include "base/files/file.h"
-#include "base/lazy_instance.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/synchronization/lock.h"
@@ -257,8 +256,6 @@ class MEDIA_GPU_EXPORT VaapiWrapper
#endif // USE_OZONE
private:
- friend class base::LazyInstance<VADisplayState>;
-
// Returns true if the VAAPI version is less than the specified version.
bool VAAPIVersionLessThan(int major, int minor);
@@ -345,6 +342,10 @@ class MEDIA_GPU_EXPORT VaapiWrapper
static VAProfile ProfileToVAProfile(VideoCodecProfile profile,
CodecMode mode);
+ // Singleton accessors.
+ static VADisplayState* GetDisplayState();
+ static LazyProfileInfos* GetProfileInfos();
+
// Pointer to VADisplayState's member |va_lock_|. Guaranteed to be valid for
// the lifetime of VaapiWrapper.
base::Lock* va_lock_;
@@ -355,9 +356,6 @@ class MEDIA_GPU_EXPORT VaapiWrapper
// VA format of surfaces with va_surface_ids_.
unsigned int va_surface_format_;
- // Singleton instance of VADisplayState.
- static base::LazyInstance<VADisplayState> va_display_state_;
-
// VA handles.
// All valid after successful Initialize() and until Deinitialize().
VADisplay va_display_;
@@ -384,10 +382,6 @@ class MEDIA_GPU_EXPORT VaapiWrapper
VAContextID va_vpp_context_id_;
VABufferID va_vpp_buffer_id_;
- // Singleton variable to store supported profile information for encode and
- // decode.
- static base::LazyInstance<LazyProfileInfos> profile_infos_;
-
DISALLOW_COPY_AND_ASSIGN(VaapiWrapper);
};
« no previous file with comments | « media/gpu/tegra_v4l2_device.cc ('k') | media/gpu/vaapi_wrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698