Index: media/base/video_frame.h |
diff --git a/media/base/video_frame.h b/media/base/video_frame.h |
index 80169cbe822990ca487fa5993d12bc2c5a7aa0d0..32b14451f12441ebf7f3167efcc74138f66d08fd 100644 |
--- a/media/base/video_frame.h |
+++ b/media/base/video_frame.h |
@@ -113,6 +113,15 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> { |
const gfx::Size& natural_size, |
base::TimeDelta timestamp); |
+ // Offers the same functionality as CreateFrame. When |zero_initialize_memory| |
+ // is true, it zeroes out the initial allocated buffers. |
+ static scoped_refptr<VideoFrame> CreateFrame(VideoPixelFormat format, |
miu
2015/09/03 22:06:13
nit: You could eliminate the boolean arg, and just
DaleCurtis
2015/09/04 22:25:13
I like CreateZeroInitializedFrame()
emircan
2015/09/04 23:59:22
sgtm. Done.
chcunningham
2015/09/05 00:07:51
+1
|
+ const gfx::Size& coded_size, |
+ const gfx::Rect& visible_rect, |
+ const gfx::Size& natural_size, |
+ base::TimeDelta timestamp, |
+ bool zero_initialize_memory); |
+ |
// Wraps a native texture of the given parameters with a VideoFrame. |
// The backing of the VideoFrame is held in the mailbox held by |
// |mailbox_holder|, and |mailbox_holder_release_cb| will be called with |
@@ -415,7 +424,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> { |
base::TimeDelta timestamp); |
virtual ~VideoFrame(); |
- void AllocateYUV(); |
+ void AllocateYUV(bool zero_initialize_memory); |
// Frame format. |
const VideoPixelFormat format_; |