Pass through the profile info when creating a high-quality scaled offscreen. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1897043002 Review URL: https://codereview.chromium.org/1897043002
diff --git a/src/core/SkBitmapScaler.cpp b/src/core/SkBitmapScaler.cpp index 398e20c..fb72875 100644 --- a/src/core/SkBitmapScaler.cpp +++ b/src/core/SkBitmapScaler.cpp
@@ -250,7 +250,10 @@ } SkBitmap result; - result.setInfo(SkImageInfo::MakeN32(destWidth, destHeight, source.alphaType())); + // Note: pass along the profile information even thought this is no the right answer because + // this could be scaling in sRGB. + result.setInfo(SkImageInfo::MakeN32(destWidth, destHeight, + source.alphaType(), source.info().profileType())); result.allocPixels(allocator, nullptr); SkPixmap resultPM;