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

Unified Diff: content/common/gpu/media/vaapi_video_decode_accelerator.cc

Issue 858653002: vaapi plumbing to allow hardware video overlays (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: make buildable before cc plumbing is in Created 5 years, 11 months 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_video_decode_accelerator.cc
diff --git a/content/common/gpu/media/vaapi_video_decode_accelerator.cc b/content/common/gpu/media/vaapi_video_decode_accelerator.cc
index b5f2b908f993e6cbcafca7b12a3edb93af25cb49..22de1e2e87a3927b6d7a038b876c8363c42018b7 100644
--- a/content/common/gpu/media/vaapi_video_decode_accelerator.cc
+++ b/content/common/gpu/media/vaapi_video_decode_accelerator.cc
@@ -12,6 +12,7 @@
#include "content/common/gpu/gpu_channel.h"
#include "content/common/gpu/media/vaapi_picture.h"
#include "content/common/gpu/media/vaapi_video_decode_accelerator.h"
+#include "gpu/command_buffer/service/texture_manager.h"
#include "media/base/bind_to_current_loop.h"
#include "media/video/picture.h"
#include "ui/gl/gl_bindings.h"
@@ -72,7 +73,8 @@ VaapiPicture* VaapiVideoDecodeAccelerator::PictureById(
}
VaapiVideoDecodeAccelerator::VaapiVideoDecodeAccelerator(
- const base::Callback<bool(void)>& make_context_current)
+ const base::Callback<bool(void)>& make_context_current,
+ gpu::gles2::TextureManager* texture_manager)
: make_context_current_(make_context_current),
state_(kUninitialized),
input_ready_(&lock_),
@@ -84,6 +86,7 @@ VaapiVideoDecodeAccelerator::VaapiVideoDecodeAccelerator(
finish_flush_pending_(false),
awaiting_va_surfaces_recycle_(false),
requested_num_pics_(0),
+ texture_manager_(texture_manager),
weak_this_factory_(this) {
weak_this_ = weak_this_factory_.GetWeakPtr();
va_surface_release_cb_ = media::BindToCurrentLoop(
@@ -523,8 +526,10 @@ void VaapiVideoDecodeAccelerator::AssignPictureBuffers(
<< " VASurfaceID: " << va_surface_ids[i];
linked_ptr<VaapiPicture> picture(VaapiPicture::CreatePicture(
- vaapi_wrapper_.get(), make_context_current_, buffers[i].id(),
- buffers[i].texture_id(), requested_pic_size_));
+ vaapi_wrapper_.get(), texture_manager_,
+ texture_manager_->GetTexture(buffers[i].internal_texture_id()),
+ make_context_current_, buffers[i].id(), buffers[i].texture_id(),
+ requested_pic_size_));
RETURN_AND_NOTIFY_ON_FAILURE(
picture.get(), "Failed assigning picture buffer to a texture.",

Powered by Google App Engine
This is Rietveld 408576698