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>
This commit is contained in:
parent
e1bc7de7c0
commit
bf54a76f0f
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user