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

Unified Diff: content/common/gpu/media/vaapi_drm_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_drm_picture.h
diff --git a/content/common/gpu/media/vaapi_drm_picture.h b/content/common/gpu/media/vaapi_drm_picture.h
index 4ea787fbcff4738a6799907b4559a3badd5b300c..f02d2925a35387f30c44e223e5951e37fa5e0cf3 100644
--- a/content/common/gpu/media/vaapi_drm_picture.h
+++ b/content/common/gpu/media/vaapi_drm_picture.h
@@ -30,7 +30,7 @@ class VaapiWrapper;
// Implementation of VaapiPicture for the ozone/drm backed chromium.
class VaapiDrmPicture : public VaapiPicture {
public:
- VaapiDrmPicture(VaapiWrapper* vaapi_wrapper,
+ VaapiDrmPicture(scoped_refptr<VaapiWrapper> vaapi_wrapper,
Pawel Osciak 2015/11/16 04:24:35 const&
william.xie1 2015/11/16 08:07:25 Done.
const base::Callback<bool(void)>& make_context_current,
int32 picture_buffer_id,
uint32 texture_id,
@@ -47,10 +47,6 @@ class VaapiDrmPicture : public VaapiPicture {
bool AllowOverlay() const override;
private:
- // Calls ScalePixmap() if weak_ptr is not NULL.
- static scoped_refptr<ui::NativePixmap> CallScalePixmap(
- base::WeakPtr<VaapiDrmPicture> weak_ptr,
- gfx::Size new_size);
// Use VPP to scale underlying pixmap_ to |new_size| and return the
// scaling result with a new pixmap.
scoped_refptr<ui::NativePixmap> ScalePixmap(gfx::Size new_size);
@@ -59,7 +55,7 @@ class VaapiDrmPicture : public VaapiPicture {
gfx::Size pixmap_size);
scoped_refptr<ui::NativePixmap> CreateNativePixmap(gfx::Size size);
- VaapiWrapper* vaapi_wrapper_; // Not owned.
+ scoped_refptr<VaapiWrapper> vaapi_wrapper_;
base::Callback<bool(void)> make_context_current_;
// Ozone buffer, the storage of the EGLImage and the VASurface.
@@ -77,9 +73,6 @@ class VaapiDrmPicture : public VaapiPicture {
// VaSurface used to apply scaling.
scoped_refptr<VASurface> scaled_va_surface_;
- // The WeakPtrFactory for VaapiDrmPicture.
- base::WeakPtrFactory<VaapiDrmPicture> weak_this_factory_;
-
DISALLOW_COPY_AND_ASSIGN(VaapiDrmPicture);
};
« no previous file with comments | « no previous file | content/common/gpu/media/vaapi_drm_picture.cc » ('j') | content/common/gpu/media/vaapi_drm_picture.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698