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

Unified Diff: webrtc/common_video/include/video_frame_buffer.h

Issue 2084893002: Implement scoped_const_refptr template. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 6 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/base/scoped_ref_ptr.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/include/video_frame_buffer.h
diff --git a/webrtc/common_video/include/video_frame_buffer.h b/webrtc/common_video/include/video_frame_buffer.h
index cf314fe9327dce39ef9a1d8fa5d9ca14d460bedd..638ff22ca5bc85ad1b5d0f1ba86d6831d799a0e7 100644
--- a/webrtc/common_video/include/video_frame_buffer.h
+++ b/webrtc/common_video/include/video_frame_buffer.h
@@ -124,11 +124,11 @@ class I420Buffer : public VideoFrameBuffer {
// Create a new buffer and copy the pixel data.
static rtc::scoped_refptr<I420Buffer> Copy(
- const rtc::scoped_refptr<VideoFrameBuffer>& buffer);
+ const rtc::scoped_const_refptr<VideoFrameBuffer>& buffer);
// Scale the cropped area of |src| to the size of |this| buffer, and
// write the result into |this|.
- void CropAndScaleFrom(const rtc::scoped_refptr<VideoFrameBuffer>& src,
+ void CropAndScaleFrom(const rtc::scoped_const_refptr<VideoFrameBuffer>& src,
int offset_x,
int offset_y,
int crop_width,
@@ -136,14 +136,14 @@ class I420Buffer : public VideoFrameBuffer {
// The common case of a center crop, when needed to adjust the
// aspect ratio without distorting the image.
- void CropAndScaleFrom(const rtc::scoped_refptr<VideoFrameBuffer>& src);
+ void CropAndScaleFrom(const rtc::scoped_const_refptr<VideoFrameBuffer>& src);
// Scale all of |src| to the size of |this| buffer, with no cropping.
- void ScaleFrom(const rtc::scoped_refptr<VideoFrameBuffer>& src);
+ void ScaleFrom(const rtc::scoped_const_refptr<VideoFrameBuffer>& src);
// Create a new buffer with identical strides, and copy the pixel data.
static rtc::scoped_refptr<I420Buffer> CopyKeepStride(
- const rtc::scoped_refptr<VideoFrameBuffer>& buffer);
+ const rtc::scoped_const_refptr<VideoFrameBuffer>& buffer);
protected:
~I420Buffer() override;
« no previous file with comments | « webrtc/base/scoped_ref_ptr.h ('k') | webrtc/common_video/video_frame_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698