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

Unified Diff: content/common/gpu/media/vaapi_picture.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_picture.h
diff --git a/content/common/gpu/media/vaapi_picture.h b/content/common/gpu/media/vaapi_picture.h
index c1fb4c5b789cc20bd7e7a2024814a2f0f8265f28..9320228ba3fe4214d7c28a16425feeccee96cb93 100644
--- a/content/common/gpu/media/vaapi_picture.h
+++ b/content/common/gpu/media/vaapi_picture.h
@@ -26,7 +26,8 @@ class VASurface;
class VaapiWrapper;
// Picture is native pixmap abstraction (X11/Ozone).
-class VaapiPicture : public base::NonThreadSafe {
+class VaapiPicture : public base::NonThreadSafe,
+ public base::RefCounted<VaapiPicture> {
Pawel Osciak 2015/11/16 04:24:35 This should likely be RefCountedThreadSafe.
william.xie1 2015/11/16 08:07:25 Done.
public:
virtual ~VaapiPicture() {}
@@ -50,8 +51,8 @@ class VaapiPicture : public base::NonThreadSafe {
// Create a VaapiPicture of |size| to be associated with
// |picture_buffer_id| and bound to |texture_id|.
// |make_context_current| is provided for the GL operations.
- static linked_ptr<VaapiPicture> CreatePicture(
- VaapiWrapper* vaapi_wrapper,
+ static scoped_refptr<VaapiPicture> CreatePicture(
+ scoped_refptr<VaapiWrapper> vaapi_wrapper,
Pawel Osciak 2015/11/16 04:24:35 const&
william.xie1 2015/11/16 08:07:26 Done.
const base::Callback<bool(void)> make_context_current,
int32 picture_buffer_id,
uint32 texture_id,

Powered by Google App Engine
This is Rietveld 408576698