Commit b60adccc authored by Chih-Yu Huang's avatar Chih-Yu Huang Committed by Commit Bot

content: Remove "const scoped_refptr<>&" at video_decoder_shim.cc

Simple refactoring to get rid of const scoped_refptr<>&.

BUG=946265
TEST=compile chrome

Change-Id: I3dd8d69ab33cece8c93edf2cf102b38796d12cdc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1597901Reviewed-by: default avatarJohn Rummell <jrummell@chromium.org>
Reviewed-by: default avatarRaymes Khoury <raymes@chromium.org>
Commit-Queue: Chih-Yu Huang <akahuang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#657621}
parent 47228171
......@@ -63,7 +63,7 @@ class VideoDecoderShim::YUVConverter {
YUVConverter(scoped_refptr<ws::ContextProviderCommandBuffer>);
~YUVConverter();
bool Initialize();
void Convert(const scoped_refptr<media::VideoFrame>& frame, GLuint tex_out);
void Convert(const media::VideoFrame* frame, GLuint tex_out);
private:
GLuint CreateShader();
......@@ -353,9 +353,8 @@ bool VideoDecoderShim::YUVConverter::Initialize() {
return (program_ != 0);
}
void VideoDecoderShim::YUVConverter::Convert(
const scoped_refptr<media::VideoFrame>& frame,
GLuint tex_out) {
void VideoDecoderShim::YUVConverter::Convert(const media::VideoFrame* frame,
GLuint tex_out) {
const float* yuv_matrix = nullptr;
const float* yuv_adjust = nullptr;
......@@ -610,8 +609,7 @@ VideoDecoderShim::PendingDecode::~PendingDecode() {
struct VideoDecoderShim::PendingFrame {
explicit PendingFrame(uint32_t decode_id);
PendingFrame(uint32_t decode_id,
const scoped_refptr<media::VideoFrame>& frame);
PendingFrame(uint32_t decode_id, scoped_refptr<media::VideoFrame> frame);
~PendingFrame();
const uint32_t decode_id;
......@@ -628,9 +626,8 @@ VideoDecoderShim::PendingFrame::PendingFrame(uint32_t decode_id)
VideoDecoderShim::PendingFrame::PendingFrame(
uint32_t decode_id,
const scoped_refptr<media::VideoFrame>& frame)
: decode_id(decode_id), video_frame(frame) {
}
scoped_refptr<media::VideoFrame> frame)
: decode_id(decode_id), video_frame(std::move(frame)) {}
VideoDecoderShim::PendingFrame::~PendingFrame() {
}
......@@ -1056,7 +1053,7 @@ void VideoDecoderShim::SendPictures() {
uint32_t local_texture_id = texture_id_map_[texture_id];
yuv_converter_->Convert(frame->video_frame, local_texture_id);
yuv_converter_->Convert(frame->video_frame.get(), local_texture_id);
host_->PictureReady(media::Picture(texture_id, frame->decode_id,
frame->video_frame->visible_rect(),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment