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
This commit is contained in:
herb 2016-04-18 14:06:21 -07:00 committed by Commit bot
parent cd07bedbe6
commit b4b83dc4df

View File

@ -250,7 +250,10 @@ bool SkBitmapScaler::Resize(SkBitmap* resultPtr, const SkPixmap& source, ResizeM
}
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;