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 e480c8c93e468ebda28e40384197ae7ddf03684c..2155735b28c3b1f729a9dbd8167b6cb958373a45 100644 |
--- a/content/common/gpu/media/vaapi_drm_picture.h |
+++ b/content/common/gpu/media/vaapi_drm_picture.h |
@@ -31,7 +31,7 @@ class VaapiWrapper; |
// Implementation of VaapiPicture for the ozone/drm backed chromium. |
class VaapiDrmPicture : public VaapiPicture { |
public: |
- VaapiDrmPicture(VaapiWrapper* vaapi_wrapper, |
+ VaapiDrmPicture(const scoped_refptr<VaapiWrapper>& vaapi_wrapper, |
const base::Callback<bool(void)>& make_context_current, |
int32 picture_buffer_id, |
uint32 texture_id, |
@@ -48,43 +48,29 @@ class VaapiDrmPicture : public VaapiPicture { |
bool AllowOverlay() const override; |
private: |
- // Calls ProcessPixmap() if weak_ptr is not NULL. |
- static scoped_refptr<ui::NativePixmap> CallProcessPixmap( |
- base::WeakPtr<VaapiDrmPicture> weak_ptr, |
- gfx::Size target_size, |
- gfx::BufferFormat target_format); |
// Use VPP to process underlying pixmap_, scaling to |target_size| and |
// converting to |target_format|. |
- scoped_refptr<ui::NativePixmap> ProcessPixmap( |
+ static scoped_refptr<ui::NativePixmap> ProcessPixmap( |
Pawel Osciak
2015/11/20 10:09:18
Please document return value and |pixmap|.
william.xie1
2015/11/23 03:33:58
Done.
|
+ const scoped_refptr<VaapiWrapper>& vaapi_wrapper, |
+ const scoped_refptr<ui::NativePixmap>& pixmap, |
gfx::Size target_size, |
gfx::BufferFormat target_format); |
- scoped_refptr<VASurface> CreateVASurfaceForPixmap( |
- scoped_refptr<ui::NativePixmap> pixmap, |
- gfx::Size pixmap_size); |
- scoped_refptr<ui::NativePixmap> CreateNativePixmap(gfx::Size size, |
- gfx::BufferFormat format); |
+ static scoped_refptr<ui::NativePixmap> CreateNativePixmap( |
+ gfx::Size size, |
+ gfx::BufferFormat format); |
- 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. |
scoped_refptr<ui::NativePixmap> pixmap_; |
- // Ozone buffer, the storage of the processed buffer for overlay. |
- scoped_refptr<ui::NativePixmap> processed_pixmap_; |
- |
// EGLImage bound to the GL textures used by the VDA client. |
scoped_refptr<gl::GLImage> gl_image_; |
// VASurface used to transfer from the decoder's pixel format. |
scoped_refptr<VASurface> va_surface_; |
- // VaSurface used to apply processing. |
- scoped_refptr<VASurface> processed_va_surface_; |
- |
- // The WeakPtrFactory for VaapiDrmPicture. |
- base::WeakPtrFactory<VaapiDrmPicture> weak_this_factory_; |
- |
DISALLOW_COPY_AND_ASSIGN(VaapiDrmPicture); |
}; |