DescriptionSupport decoding opaque to *premul
If a client requests unpremul or premul from an opaque SkCodec,
support it. The opaque image can be treated as any of them, though
it will be less efficient to draw than if the client had used
opaque.
Change the filling code (i.e. for incomplete images) to base its color on
the source alpha type. Prior to adding the support to decode opaque to
any, it was fine to use either source or dest (which would have yielded
the same result). If the client requests non-opaque, we do not want this
to switch the fill value from black to transparent. This also allows
simplifying the signatures for getFillValue and onGetFillValue.
In CodexTest, expect the same result when decoding opaque to *premul,
and compare to the opaque version.
BUG=skia:4616
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1641273003
Committed: https://skia.googlesource.com/skia/+/c5560bef14149f4c945a4536988aeba1a16adedc
Patch Set 1 #Patch Set 2 : Remove unnecessary change. #Patch Set 3 : Make the fill value consistent #Patch Set 4 : No need for alphaType parameter #
Total comments: 7
Patch Set 5 : Fix bug in BMP #Patch Set 6 : Test opaque to premul in dm #
Total comments: 4
Patch Set 7 : Add warning, and suffix for unpremul #Patch Set 8 : Rewrite warning; add warning to SkJpegCodec #Patch Set 9 : Rebase, just in case #Patch Set 10 : Update SkMaskSwizzler to support opaque to premul #
Total comments: 2
Messages
Total messages: 28 (14 generated)
|