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 44d9db733f91097c66a0abfe237483dafc544959..9805ecd766819367454c4c3094b01c424b36487d 100644 |
--- a/content/common/gpu/media/vaapi_picture.h |
+++ b/content/common/gpu/media/vaapi_picture.h |
@@ -16,6 +16,13 @@ |
#include "base/threading/non_thread_safe.h" |
#include "ui/gfx/geometry/size.h" |
+namespace gpu { |
+namespace gles2 { |
+class TextureManager; |
+class TextureRef; |
+} |
+} |
+ |
namespace content { |
class VASurface; |
@@ -27,11 +34,13 @@ class VaapiPicture : public base::NonThreadSafe { |
virtual ~VaapiPicture() {} |
// Try to allocate the underlying resources for the picture. |
- virtual bool Initialize() = 0; |
+ virtual bool Initialize(gpu::gles2::TextureManager* texture_manager, |
Pawel Osciak
2015/01/21 13:07:08
Please add documentation for changed methods in th
|
+ gpu::gles2::TextureRef* texture_ref) = 0; |
int32 picture_buffer_id() const { return picture_buffer_id_; } |
uint32 texture_id() const { return texture_id_; } |
const gfx::Size& size() const { return size_; } |
+ bool allow_overlay() const { return allow_overlay_; } |
Pawel Osciak
2015/01/21 13:07:08
Could this instead be a virtual method returning f
achaulk
2015/01/21 17:10:03
It could be, sure
|
// Downloads the |va_surface| into the picture, potentially scaling |
// it if needed. |
@@ -43,6 +52,8 @@ class VaapiPicture : public base::NonThreadSafe { |
// |make_context_current| is provided for the GL operations. |
static linked_ptr<VaapiPicture> CreatePicture( |
VaapiWrapper* vaapi_wrapper, |
+ gpu::gles2::TextureManager* texture_manager, |
+ gpu::gles2::TextureRef* texture_ref, |
piman
2015/01/21 23:58:22
You may want to document that the texture_ref can'
|
const base::Callback<bool(void)> make_context_current, |
int32 picture_buffer_id, |
uint32 texture_id, |
@@ -55,15 +66,18 @@ class VaapiPicture : public base::NonThreadSafe { |
protected: |
VaapiPicture(int32 picture_buffer_id, |
uint32 texture_id, |
- const gfx::Size& size) |
+ const gfx::Size& size, |
+ bool allow_overlay) |
: picture_buffer_id_(picture_buffer_id), |
texture_id_(texture_id), |
- size_(size) {} |
+ size_(size), |
+ allow_overlay_(allow_overlay) {} |
private: |
int32 picture_buffer_id_; |
uint32 texture_id_; |
gfx::Size size_; |
+ bool allow_overlay_; |
DISALLOW_COPY_AND_ASSIGN(VaapiPicture); |
}; |