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

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

Issue 1432963003: [Ozone] Extends the lifetime of VaapiWrapper (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: NOT for upstream Created 5 years, 1 month 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_wrapper.h
diff --git a/content/common/gpu/media/vaapi_wrapper.h b/content/common/gpu/media/vaapi_wrapper.h
index 49e9f04f4cee79bfb6ad721e51a813e5c74e9cb2..a772ce7fb7390ac89ae408ce51d8ba11aa3c1062 100644
--- a/content/common/gpu/media/vaapi_wrapper.h
+++ b/content/common/gpu/media/vaapi_wrapper.h
@@ -43,7 +43,7 @@ namespace content {
// It is also responsible for managing and freeing VABuffers (not VASurfaces),
// which are used to queue parameters and slice data to the HW codec,
// as well as underlying memory for VASurfaces themselves.
-class CONTENT_EXPORT VaapiWrapper {
+class CONTENT_EXPORT VaapiWrapper : public base::RefCounted<VaapiWrapper> {
public:
enum CodecMode {
kDecode,
@@ -54,7 +54,7 @@ class CONTENT_EXPORT VaapiWrapper {
// Return an instance of VaapiWrapper initialized for |va_profile| and
// |mode|. |report_error_to_uma_cb| will be called independently from
// reporting errors to clients via method return values.
- static scoped_ptr<VaapiWrapper> Create(
+ static scoped_refptr<VaapiWrapper> Create(
CodecMode mode,
VAProfile va_profile,
const base::Closure& report_error_to_uma_cb);
@@ -63,7 +63,7 @@ class CONTENT_EXPORT VaapiWrapper {
// |profile| to VAProfile.
// |report_error_to_uma_cb| will be called independently from reporting
// errors to clients via method return values.
- static scoped_ptr<VaapiWrapper> CreateForVideoCodec(
+ static scoped_refptr<VaapiWrapper> CreateForVideoCodec(
CodecMode mode,
media::VideoCodecProfile profile,
const base::Closure& report_error_to_uma_cb);

Powered by Google App Engine
This is Rietveld 408576698