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

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

Issue 1885943004: Revert of Introduce an IsMutable method on VideoFrameBuffer. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 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/i420_buffer_pool_unittest.cc ('k') | webrtc/common_video/video_frame.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 f1b78492baf2f9cadaecb6a243c33cf5460229b0..9cf57a43591b1da66f82ed9d59ffde5794fdc212 100644
--- a/webrtc/common_video/include/video_frame_buffer.h
+++ b/webrtc/common_video/include/video_frame_buffer.h
@@ -33,13 +33,7 @@
// not contain any frame metadata such as rotation, timestamp, pixel_width, etc.
class VideoFrameBuffer : public rtc::RefCountInterface {
public:
- // Returns true if the caller is exclusive owner, and allowed to
- // call MutableData.
- virtual bool IsMutable() = 0;
-
- // Underlying refcount access, used to implement IsMutable.
- // TODO(nisse): Demote to protected, as soon as Chrome is changed to
- // use IsMutable.
+ // Returns true if this buffer has a single exclusive owner.
virtual bool HasOneRef() const = 0;
// The resolution of the frame in pixels. For formats where some planes are
@@ -82,7 +76,6 @@
const uint8_t* data(PlaneType type) const override;
// Non-const data access is only allowed if HasOneRef() is true to protect
// against unexpected overwrites.
- bool IsMutable() override;
uint8_t* MutableData(PlaneType type) override;
int stride(PlaneType type) const override;
void* native_handle() const override;
@@ -117,7 +110,6 @@
const uint8_t* data(PlaneType type) const override;
int stride(PlaneType type) const override;
void* native_handle() const override;
- bool IsMutable() override;
protected:
void* native_handle_;
@@ -138,8 +130,6 @@
const rtc::Callback0<void>& no_longer_used);
int width() const override;
int height() const override;
-
- bool IsMutable() override;
const uint8_t* data(PlaneType type) const override;
« no previous file with comments | « webrtc/common_video/i420_buffer_pool_unittest.cc ('k') | webrtc/common_video/video_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698