Commit c71ea170 authored by Zinovy Nis's avatar Zinovy Nis Committed by Commit Bot

[clang-tidy] Make DecodedDrawImage moveable to utilize std::move in ImageProvider.

cc/paint/image_provider.cc:14:14: warning: passing result of std::move() as a const reference argument; no move will actually happen [hicpp-move-const-arg]
    : image_(std::move(image)) {}
             ^~~~~~~~~~     ~
cc/paint/image_provider.cc:18:14: warning: passing result of std::move() as a const reference argument; no move will actually happen [hicpp-move-const-arg]
    : image_(std::move(image)), destruction_callback_(std::move(callback)) {}
             ^~~~~~~~~~     ~
cc/paint/image_provider.cc:27:14: warning: passing result of std::move() as a const reference argument; no move will actually happen [hicpp-move-const-arg]
    : image_(std::move(other.image_)),
             ^~~~~~~~~~            ~
cc/paint/image_provider.cc:37:12: warning: passing result of std::move() as a const reference argument; no move will actually happen [hicpp-move-const-arg]
  image_ = std::move(other.image_);
           ^~~~~~~~~~            ~

Change-Id: I2c3d49f7833ea117ef1b6aec4cf9037d19cb7c81
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1489751Reviewed-by: default avatarKhushal <khushalsagar@chromium.org>
Reviewed-by: default avatarvmpstr <vmpstr@chromium.org>
Commit-Queue: Zinovy Nis <zynis@yandex-team.ru>
Cr-Commit-Position: refs/heads/master@{#638479}
parent 6e5c4298
......@@ -38,7 +38,11 @@ DecodedDrawImage::DecodedDrawImage()
kNone_SkFilterQuality,
true) {}
DecodedDrawImage::DecodedDrawImage(const DecodedDrawImage& other) = default;
DecodedDrawImage::DecodedDrawImage(const DecodedDrawImage&) = default;
DecodedDrawImage::DecodedDrawImage(DecodedDrawImage&&) = default;
DecodedDrawImage& DecodedDrawImage::operator=(const DecodedDrawImage&) =
default;
DecodedDrawImage& DecodedDrawImage::operator=(DecodedDrawImage&&) = default;
DecodedDrawImage::~DecodedDrawImage() = default;
......
......@@ -36,6 +36,10 @@ class CC_PAINT_EXPORT DecodedDrawImage {
bool needs_mips,
bool is_budgeted);
DecodedDrawImage(const DecodedDrawImage& other);
DecodedDrawImage(DecodedDrawImage&& other);
DecodedDrawImage& operator=(const DecodedDrawImage&);
DecodedDrawImage& operator=(DecodedDrawImage&&);
DecodedDrawImage();
~DecodedDrawImage();
......
......@@ -396,7 +396,7 @@ class GpuImageDecodeCacheTest
return new_draw_image;
}
return draw_image;
return std::move(draw_image);
}
sk_sp<SkImage> GetLastTransferredImage() {
......
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