vcl/skia/salbmp.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
New commits: commit 7a1250b17cb671d3f57f13842ee3df8c49f8af19 Author: Patrick Luby <plub...@neooffice.org> AuthorDate: Sat Oct 28 15:03:12 2023 -0400 Commit: Patrick Luby <plub...@neooffice.org> CommitDate: Sat Oct 28 22:45:34 2023 +0200 Fix testDelayedScaleAlphaImage unit test Do not return the alpha mask if it is awaiting pending scaling. Pending scaling has not yet been done at this point since the scaling is done in the code following this block. Change-Id: I995d7f7eca4190f0a8b2094928bd92f718f1d5bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158599 Tested-by: Jenkins Reviewed-by: Patrick Luby <plub...@neooffice.org> diff --git a/vcl/skia/salbmp.cxx b/vcl/skia/salbmp.cxx index fe92a7a44110..13cf8aa5a4b9 100644 --- a/vcl/skia/salbmp.cxx +++ b/vcl/skia/salbmp.cxx @@ -963,7 +963,12 @@ const sk_sp<SkImage>& SkiaSalBitmap::GetAlphaSkImage(DirectImage direct) const // be temporary. SkiaSalBitmap* thisPtr = const_cast<SkiaSalBitmap*>(this); thisPtr->mAlphaImage = alphaImage; - return mAlphaImage; + // Fix testDelayedScaleAlphaImage unit test + // Do not return the alpha mask if it is awaiting pending scaling. + // Pending scaling has not yet been done at this point since the + // scaling is done in the code following this block. + if (!scaling) + return mAlphaImage; } // Move the R channel value to the alpha channel. This seems to be the only // way to reinterpret data in SkImage as an alpha SkImage without accessing the pixels.