Chromium Code Reviews| 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); |
| }; |