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

Unified Diff: media/base/video_util.h

Issue 1737253002: Handle Alpha channel in Canvas capture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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_util.h
diff --git a/media/base/video_util.h b/media/base/video_util.h
index e51343344a098376193636406d5652dcece7d0dc..a67d0a4c96c410554cf44e3bd88fe78d9d628b1c 100644
--- a/media/base/video_util.h
+++ b/media/base/video_util.h
@@ -7,6 +7,7 @@
#include <stdint.h>
+#include "base/memory/ref_counted.h"
#include "media/base/media_export.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
@@ -92,6 +93,10 @@ MEDIA_EXPORT void CopyRGBToVideoFrame(const uint8_t* source,
const gfx::Rect& region_in_frame,
VideoFrame* frame);
+// Converts a frame with YV12A format into I420 by dropping alpha channel.
+MEDIA_EXPORT scoped_refptr<VideoFrame> DropYV12AAlphaChannel(
mcasas 2016/02/29 23:48:01 I was surprised that it returned a scoped_refptr<V
emircan 2016/03/01 20:07:55 I see your point. WrapAsOpaque() might also imply
+ const scoped_refptr<VideoFrame>& frame);
+
} // namespace media
#endif // MEDIA_BASE_VIDEO_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698