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

media/gpu: Remove "const scoped_refptr<T>&" at DecodeSurfaceHandler.

The Chromium smart pointer guidelines [1] says "don't pass or return a
smart pointer by reference". This CL remove "const scoped_refptr<T>&"
at DecodeSurfaceHandler.

[1] https://www.chromium.org/developers/smart-pointer-guidelines

Bug: 1020668
Test: run vda_tests on kevin and octopus

Change-Id: I7fb98618147a1f9bceb0203b41faaa9ba58fa38c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1974717Reviewed-by: default avatarHirokazu Honda <hiroh@chromium.org>
Commit-Queue: Chih-Yu Huang <akahuang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#726259}
parent cb0df326
......@@ -34,7 +34,7 @@ class DecodeSurfaceHandler {
// the same order as SurfaceReady is called. (On Intel, this order doesn't
// need to be explicitly maintained since the driver will enforce it, together
// with any necessary dependencies).
virtual void SurfaceReady(const scoped_refptr<T>& dec_surface,
virtual void SurfaceReady(scoped_refptr<T> dec_surface,
int32_t bitstream_id,
const gfx::Rect& visible_rect,
const VideoColorSpace& color_space) = 0;
......
......@@ -1975,7 +1975,7 @@ void V4L2SliceVideoDecodeAccelerator::DecodeSurface(
}
void V4L2SliceVideoDecodeAccelerator::SurfaceReady(
const scoped_refptr<V4L2DecodeSurface>& dec_surface,
scoped_refptr<V4L2DecodeSurface> dec_surface,
int32_t bitstream_id,
const gfx::Rect& visible_rect,
const VideoColorSpace& /* color_space */) {
......
......@@ -145,7 +145,7 @@ class MEDIA_GPU_EXPORT V4L2SliceVideoDecodeAccelerator
scoped_refptr<V4L2DecodeSurface> CreateSurface() override;
// SurfaceReady() uses |decoder_display_queue_| to guarantee that decoding
// of |dec_surface| happens in order.
void SurfaceReady(const scoped_refptr<V4L2DecodeSurface>& dec_surface,
void SurfaceReady(scoped_refptr<V4L2DecodeSurface> dec_surface,
int32_t bitstream_id,
const gfx::Rect& visible_rect,
const VideoColorSpace& /* color_space */) override;
......
......@@ -349,7 +349,7 @@ void V4L2StatelessVideoDecoderBackend::DecodeSurface(
}
void V4L2StatelessVideoDecoderBackend::SurfaceReady(
const scoped_refptr<V4L2DecodeSurface>& dec_surface,
scoped_refptr<V4L2DecodeSurface> dec_surface,
int32_t bitstream_id,
const gfx::Rect& visible_rect,
const VideoColorSpace& /* color_space */) {
......
......@@ -54,7 +54,7 @@ class V4L2StatelessVideoDecoderBackend : public V4L2VideoDecoderBackend,
size_t size) override;
void DecodeSurface(
const scoped_refptr<V4L2DecodeSurface>& dec_surface) override;
void SurfaceReady(const scoped_refptr<V4L2DecodeSurface>& dec_surface,
void SurfaceReady(scoped_refptr<V4L2DecodeSurface> dec_surface,
int32_t bitstream_id,
const gfx::Rect& visible_rect,
const VideoColorSpace& color_space) override;
......
......@@ -1000,7 +1000,7 @@ bool VaapiVideoDecodeAccelerator::TryToSetupDecodeOnSeparateThread(
}
void VaapiVideoDecodeAccelerator::SurfaceReady(
const scoped_refptr<VASurface>& dec_surface,
scoped_refptr<VASurface> dec_surface,
int32_t bitstream_id,
const gfx::Rect& visible_rect,
const VideoColorSpace& color_space) {
......
......@@ -90,7 +90,7 @@ class MEDIA_GPU_EXPORT VaapiVideoDecodeAccelerator
// DecodeSurfaceHandler implementation.
scoped_refptr<VASurface> CreateSurface() override;
void SurfaceReady(const scoped_refptr<VASurface>& va_surface,
void SurfaceReady(scoped_refptr<VASurface> va_surface,
int32_t bitstream_id,
const gfx::Rect& visible_rect,
const VideoColorSpace& color_space) override;
......
......@@ -337,7 +337,7 @@ scoped_refptr<VASurface> VaapiVideoDecoder::CreateSurface() {
std::move(release_frame_cb));
}
void VaapiVideoDecoder::SurfaceReady(const scoped_refptr<VASurface>& va_surface,
void VaapiVideoDecoder::SurfaceReady(scoped_refptr<VASurface> va_surface,
int32_t buffer_id,
const gfx::Rect& visible_rect,
const VideoColorSpace& /*color_space*/) {
......
......@@ -57,7 +57,7 @@ class VaapiVideoDecoder : public DecoderInterface,
// DecodeSurfaceHandler<VASurface> implementation.
scoped_refptr<VASurface> CreateSurface() override;
void SurfaceReady(const scoped_refptr<VASurface>& va_surface,
void SurfaceReady(scoped_refptr<VASurface> va_surface,
int32_t buffer_id,
const gfx::Rect& visible_rect,
const VideoColorSpace& color_space) override;
......
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