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

Unified Diff: webrtc/modules/desktop_capture/screen_capture_frame_queue.h

Issue 1988783003: Use std::unique_ptr<> to pass frame ownership in DesktopCapturer impls. (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
Index: webrtc/modules/desktop_capture/screen_capture_frame_queue.h
diff --git a/webrtc/modules/desktop_capture/screen_capture_frame_queue.h b/webrtc/modules/desktop_capture/screen_capture_frame_queue.h
index 97f3b810e9d64d467e164ce16b53946289c3dcf8..b7945b0921cc719cd25ccc7f6e35660ec1dbf275 100644
--- a/webrtc/modules/desktop_capture/screen_capture_frame_queue.h
+++ b/webrtc/modules/desktop_capture/screen_capture_frame_queue.h
@@ -49,8 +49,8 @@ class ScreenCaptureFrameQueue {
// Replaces the current frame with a new one allocated by the caller. The
// existing frame (if any) is destroyed. Takes ownership of |frame|.
- void ReplaceCurrentFrame(FrameType* frame) {
- frames_[current_].reset(frame);
+ void ReplaceCurrentFrame(std::unique_ptr<FrameType> frame) {
+ frames_[current_] = std::move(frame);
}
// Marks all frames obsolete and resets the previous frame pointer. No
« no previous file with comments | « webrtc/modules/desktop_capture/desktop_frame_win.cc ('k') | webrtc/modules/desktop_capture/screen_capturer_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698