In ScaleSkImage (static method defined in ImageBitmap.cpp), when the color components are greater than alpha (happens when tagging unpremul images as premul to be able to use the Skia scaling pipeline), kHigh_SkFilterQuality clamps color components higher than alpha to alpha. This is not happening with kNone_, kLow_, and kMedium_ filter qualities.
As a workaround, we downgrade kHigh_SkFilterQuality to kMedium_ for unpremul images. This does not affect the quality of down-scaling, but should be fixed to get the highest upscaling quality. Fix this when the related Skia bug (bugs.chromium.org/p/skia/issues/detail?id=6855) is resolved.
Comment 1 by zakerinasab@chromium.org
, Jul 17 2017