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

Unified Diff: media/base/video_frame.cc

Issue 14199002: Send hardware video frames with mailboxes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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: media/base/video_frame.cc
diff --git a/media/base/video_frame.cc b/media/base/video_frame.cc
index 62e81ca574d841f07127e7a50a6896bf8dc6bba2..d43ffc626fa1c2c689831e4832f6c2d4dcc7bdee 100644
--- a/media/base/video_frame.cc
+++ b/media/base/video_frame.cc
@@ -63,7 +63,7 @@ bool VideoFrame::IsValidConfig(VideoFrame::Format format,
// static
scoped_refptr<VideoFrame> VideoFrame::WrapNativeTexture(
- uint32 texture_id,
+ const gpu::Mailbox& texture_mailbox,
uint32 texture_target,
const gfx::Size& coded_size,
const gfx::Rect& visible_rect,
@@ -73,7 +73,7 @@ scoped_refptr<VideoFrame> VideoFrame::WrapNativeTexture(
const base::Closure& no_longer_needed_cb) {
scoped_refptr<VideoFrame> frame(new VideoFrame(
NATIVE_TEXTURE, coded_size, visible_rect, natural_size, timestamp));
- frame->texture_id_ = texture_id;
+ frame->texture_mailbox_ = texture_mailbox;
frame->texture_target_ = texture_target;
frame->read_pixels_cb_ = read_pixels_cb;
frame->no_longer_needed_cb_ = no_longer_needed_cb;
@@ -253,7 +253,6 @@ VideoFrame::VideoFrame(VideoFrame::Format format,
coded_size_(coded_size),
visible_rect_(visible_rect),
natural_size_(natural_size),
- texture_id_(0),
texture_target_(0),
timestamp_(timestamp) {
memset(&strides_, 0, sizeof(strides_));
@@ -325,9 +324,9 @@ uint8* VideoFrame::data(size_t plane) const {
return data_[plane];
}
-uint32 VideoFrame::texture_id() const {
+const gpu::Mailbox& VideoFrame::texture_mailbox() const {
DCHECK_EQ(format_, NATIVE_TEXTURE);
- return texture_id_;
+ return texture_mailbox_;
}
uint32 VideoFrame::texture_target() const {

Powered by Google App Engine
This is Rietveld 408576698