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

Unified Diff: media/base/video_frame_pool.cc

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
« media/base/video_frame.h ('K') | « media/base/video_frame.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/video_frame_pool.cc
diff --git a/media/base/video_frame_pool.cc b/media/base/video_frame_pool.cc
index b834f82838b9d31c0ae0c60d9a0668444ecd5067..9cd961d71f9ed095bd5e0bf48017106bd4e76b43 100644
--- a/media/base/video_frame_pool.cc
+++ b/media/base/video_frame_pool.cc
@@ -63,7 +63,6 @@ scoped_refptr<VideoFrame> VideoFramePool::PoolImpl::CreateFrame(
DCHECK(!is_shutdown_);
scoped_refptr<VideoFrame> frame;
-
while (!frame.get() && !frames_.empty()) {
scoped_refptr<VideoFrame> pool_frame = frames_.front();
frames_.pop_front();
@@ -80,17 +79,7 @@ scoped_refptr<VideoFrame> VideoFramePool::PoolImpl::CreateFrame(
if (!frame.get()) {
frame = VideoFrame::CreateFrame(format, coded_size, visible_rect,
- natural_size, timestamp);
-
- // Zero-initialize each plane of the buffer.
- const size_t num_planes = VideoFrame::NumPlanes(frame->format());
- for (size_t i = 0; i < num_planes; ++i) {
- memset(frame->data(i),
- 0,
- VideoFrame::PlaneSize(frame->format(),
- i,
- frame->coded_size()).GetArea());
- }
+ natural_size, timestamp, true);
}
scoped_refptr<VideoFrame> wrapped_frame = VideoFrame::WrapVideoFrame(
« media/base/video_frame.h ('K') | « media/base/video_frame.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698