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

Unified Diff: webrtc/common_video/video_frame.cc

Issue 2009193002: Delete IsMutable and IsExclusive methods. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Delete redundant RefCountedObject wrapping. Created 4 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
« no previous file with comments | « webrtc/common_video/include/video_frame_buffer.h ('k') | webrtc/common_video/video_frame_buffer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/common_video/video_frame.cc
diff --git a/webrtc/common_video/video_frame.cc b/webrtc/common_video/video_frame.cc
index 4bd23f98dc06f796029f8fd4813355b91d11a813..978dde15b75eaa779a261d3c0636058e38556ef0 100644
--- a/webrtc/common_video/video_frame.cc
+++ b/webrtc/common_video/video_frame.cc
@@ -66,18 +66,7 @@ void VideoFrame::CreateEmptyFrame(int width,
render_time_ms_ = 0;
rotation_ = kVideoRotation_0;
- // Check if it's safe to reuse allocation.
- if (video_frame_buffer_ && video_frame_buffer_->IsMutable() &&
- !video_frame_buffer_->native_handle() &&
- width == video_frame_buffer_->width() &&
- height == video_frame_buffer_->height() &&
- stride_y == video_frame_buffer_->StrideY() &&
- stride_u == video_frame_buffer_->StrideU() &&
- stride_v == video_frame_buffer_->StrideV()) {
- return;
- }
-
- // Need to allocate new buffer.
+ // Allocate a new buffer.
video_frame_buffer_ = new rtc::RefCountedObject<I420Buffer>(
width, height, stride_y, stride_u, stride_v);
}
« no previous file with comments | « webrtc/common_video/include/video_frame_buffer.h ('k') | webrtc/common_video/video_frame_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698