Chromium Code Reviews| Index: content/common/gpu/media/va_surface.h |
| diff --git a/content/common/gpu/media/va_surface.h b/content/common/gpu/media/va_surface.h |
| index 88dfc2a90417e86627477fbb0e918d5e351186c2..9eca471157c37e4fd2094def2a6485cb42fc5fcb 100644 |
| --- a/content/common/gpu/media/va_surface.h |
| +++ b/content/common/gpu/media/va_surface.h |
| @@ -8,7 +8,11 @@ |
| #ifndef CONTENT_COMMON_GPU_MEDIA_VA_SURFACE_H_ |
| #define CONTENT_COMMON_GPU_MEDIA_VA_SURFACE_H_ |
| +#include "base/callback.h" |
| +#include "base/memory/ref_counted.h" |
| +#include "content/common/content_export.h" |
| #include "third_party/libva/va/va.h" |
| +#include "ui/gfx/size.h" |
| namespace content { |
| @@ -16,7 +20,7 @@ namespace content { |
| // and use as reference for decoding other surfaces. It is also handed by the |
| // decoder to VaapiVideoDecodeAccelerator when the contents of the surface are |
| // ready and should be displayed. VAVDA converts the surface contents into an |
| -// X Pixmap bound to a texture for display and releases its reference to it. |
| +// X/Drm Pixmap bound to a texture for display and releases its reference to it. |
| // Decoder releases its references to the surface when it's done decoding and |
| // using it as reference. Note that a surface may still be used for reference |
| // after it's been sent to output and also after it is no longer used by VAVDA. |
| @@ -56,12 +60,12 @@ namespace content { |
| // | VASurface to VaapiVideoDecodeAccelerator, VASurface as reference for |
| // | which stores it (taking a ref) on decoding more frames. |
| // | pending_output_cbs_ queue until an output | |
| -// | TFPPicture becomes available. v |
| +// | VaapiPicture becomes available. v |
| // | | Once the DecodeSurface is not |
| // | | needed as reference anymore, |
| // | v it is released, releasing the |
| -// | A TFPPicture becomes available after associated VASurface reference. |
| -// | the client of VVDA returns | |
| +// | A VaapiPicture becomes available after the associated VASurface reference. |
| +// | available after the client of VVDA returns | |
|
Pawel Osciak
2014/11/12 05:52:57
Broken comment.
llandwerlin-old
2014/11/12 18:04:42
Acknowledged.
|
| // | a PictureBuffer associated with it. VVDA | |
| // | puts the contents of the VASurface into | |
| // | it and releases the reference to VASurface. | |
| @@ -84,17 +88,22 @@ class CONTENT_EXPORT VASurface : public base::RefCountedThreadSafe<VASurface> { |
| // are released. |
| typedef base::Callback<void(VASurfaceID)> ReleaseCB; |
| - VASurface(VASurfaceID va_surface_id, const ReleaseCB& release_cb); |
| + VASurface(VASurfaceID va_surface_id, |
| + const gfx::Size& size, |
| + const ReleaseCB& release_cb); |
| VASurfaceID id() { |
| return va_surface_id_; |
| } |
| + const gfx::Size& size() const { return size_; } |
| + |
| private: |
| friend class base::RefCountedThreadSafe<VASurface>; |
| ~VASurface(); |
| const VASurfaceID va_surface_id_; |
| + gfx::Size size_; |
| ReleaseCB release_cb_; |
| DISALLOW_COPY_AND_ASSIGN(VASurface); |