Don't use const scoped_refptr<VP9Picture>& anywhere in the accelerators
Pass raw pointers and for helper methods and normal scoped_refptr's
talking to accelerators.
VP9Accelerator::GetFrameContext Converted
VP9Accelerator: :OutputPicture Converted
Bug: 890054
Change-Id: I7ccefdaf312caf54d1f9d399e3be7aadd79422a3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1592624
Commit-Queue: Ted Meyer <tmathmeyer@chromium.org>
Reviewed-by: John Rummell <jrummell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#657904}
diff --git a/media/gpu/vp9_decoder.cc b/media/gpu/vp9_decoder.cc
index d0cf58a..f5ecfbb 100644
--- a/media/gpu/vp9_decoder.cc
+++ b/media/gpu/vp9_decoder.cc
@@ -204,13 +204,13 @@
}
void VP9Decoder::UpdateFrameContext(
- const scoped_refptr<VP9Picture>& pic,
+ scoped_refptr<VP9Picture> pic,
const base::Callback<void(const Vp9FrameContext&)>& context_refresh_cb) {
DCHECK(context_refresh_cb);
Vp9FrameContext frame_ctx;
memset(&frame_ctx, 0, sizeof(frame_ctx));
- if (!accelerator_->GetFrameContext(pic, &frame_ctx)) {
+ if (!accelerator_->GetFrameContext(std::move(pic), &frame_ctx)) {
SetError();
return;
}
@@ -239,7 +239,7 @@
return false;
}
- ref_frames_.Refresh(pic);
+ ref_frames_.Refresh(std::move(pic));
return true;
}