diff options
author | Hal Canary <halcanary@google.com> | 2018-06-14 09:41:27 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-06-14 14:15:07 +0000 |
commit | bf54a76f0f4306142ac5ec5ebd11d029d0d05546 (patch) | |
tree | 05eb82ded4d4aa717c8107de4bf21744dffc9879 /include/core | |
parent | e1bc7de7c07686b28b00b850e44e0722189f3592 (diff) |
SkImageInfo: MakeN32*() avoids extra ref/deref
Change-Id: I8d5c07222bd1cd1bea4fc0060d07a29786f8e254
Reviewed-on: https://skia-review.googlesource.com/134784
Commit-Queue: Hal Canary <halcanary@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Diffstat (limited to 'include/core')
-rw-r--r-- | include/core/SkImageInfo.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/core/SkImageInfo.h b/include/core/SkImageInfo.h index 42491de5e7..01e887361f 100644 --- a/include/core/SkImageInfo.h +++ b/include/core/SkImageInfo.h @@ -249,7 +249,7 @@ public: */ static SkImageInfo MakeN32(int width, int height, SkAlphaType at, sk_sp<SkColorSpace> cs = nullptr) { - return Make(width, height, kN32_SkColorType, at, cs); + return Make(width, height, kN32_SkColorType, at, std::move(cs)); } /** Creates SkImageInfo from integral dimensions width and height, kN32_SkColorType, @@ -282,7 +282,7 @@ public: @return created SkImageInfo */ static SkImageInfo MakeN32Premul(int width, int height, sk_sp<SkColorSpace> cs = nullptr) { - return Make(width, height, kN32_SkColorType, kPremul_SkAlphaType, cs); + return Make(width, height, kN32_SkColorType, kPremul_SkAlphaType, std::move(cs)); } /** Creates SkImageInfo from integral dimensions width and height, kN32_SkColorType, |