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

Unified Diff: media/base/video_frame.cc

Issue 1134643002: Add distinction between RGB and RGBA native texture video frames and resources (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 c837159958739edb5d4d3708d1dab8af0bc45562..ac34ba8e29e2fd601509f87378ff80b243bbbde3 100644
--- a/media/base/video_frame.cc
+++ b/media/base/video_frame.cc
@@ -249,7 +249,8 @@ scoped_refptr<VideoFrame> VideoFrame::WrapNativeTexture(
const gfx::Rect& visible_rect,
const gfx::Size& natural_size,
base::TimeDelta timestamp,
- bool allow_overlay) {
+ bool allow_overlay,
+ bool has_alpha) {
scoped_refptr<VideoFrame> frame(new VideoFrame(NATIVE_TEXTURE,
coded_size,
visible_rect,
@@ -259,6 +260,7 @@ scoped_refptr<VideoFrame> VideoFrame::WrapNativeTexture(
false));
frame->mailbox_holder_release_cb_ = mailbox_holder_release_cb;
frame->allow_overlay_ = allow_overlay;
+ frame->has_alpha_ = has_alpha;
return frame;
}
@@ -677,7 +679,8 @@ VideoFrame::VideoFrame(VideoFrame::Format format,
timestamp_(timestamp),
release_sync_point_(0),
end_of_stream_(end_of_stream),
- allow_overlay_(false) {
+ allow_overlay_(false),
+ has_alpha_(false) {
DCHECK(IsValidConfig(format_, coded_size_, visible_rect_, natural_size_));
memset(&strides_, 0, sizeof(strides_));

Powered by Google App Engine
This is Rietveld 408576698