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

Unified Diff: media/capture/content/thread_safe_capture_oracle.cc

Issue 2490153003: [Mojo Video Capture] Replace const scoped_refptr<T>& with scoped_refptr<T> and use std::move (Closed)
Patch Set: fix bots Created 4 years, 1 month 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: media/capture/content/thread_safe_capture_oracle.cc
diff --git a/media/capture/content/thread_safe_capture_oracle.cc b/media/capture/content/thread_safe_capture_oracle.cc
index 50a0d6aeb12bfa4ee47fb62d35c423fcc27d662e..c406396eea8e57d70ce35ccab6d4e8e379a08490 100644
--- a/media/capture/content/thread_safe_capture_oracle.cc
+++ b/media/capture/content/thread_safe_capture_oracle.cc
@@ -168,7 +168,7 @@ bool ThreadSafeCaptureOracle::AttemptPassiveRefresh() {
return false;
}
- capture_callback.Run(frame, refresh_time, true);
+ capture_callback.Run(std::move(frame), refresh_time, true);
return true;
}
@@ -201,7 +201,7 @@ void ThreadSafeCaptureOracle::DidCaptureFrame(
std::unique_ptr<VideoCaptureDevice::Client::Buffer> buffer,
base::TimeTicks capture_begin_time,
base::TimeDelta estimated_frame_duration,
- const scoped_refptr<VideoFrame>& frame,
+ scoped_refptr<VideoFrame> frame,
base::TimeTicks reference_time,
bool success) {
TRACE_EVENT_ASYNC_END2("gpu.capture", "Capture", buffer.get(), "success",
@@ -232,7 +232,7 @@ void ThreadSafeCaptureOracle::DidCaptureFrame(
base::Bind(&ThreadSafeCaptureOracle::DidConsumeFrame, this,
frame_number, frame->metadata()));
- client_->OnIncomingCapturedVideoFrame(std::move(buffer), frame);
+ client_->OnIncomingCapturedVideoFrame(std::move(buffer), std::move(frame));
}
}

Powered by Google App Engine
This is Rietveld 408576698