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

Unified Diff: media/base/video_frame.h

Issue 1313413010: Add VideoFrame::CreateZeroInitializedFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « no previous file | media/base/video_frame.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « no previous file | media/base/video_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698