RFR: 8243505: SRC_OVER alpha composite mode doesn't render correctly
Kevin Rushforth
kevin.rushforth at oracle.com
Fri Apr 24 16:20:21 UTC 2020
Good. I actually had it the way you show below first, and then reverted
the change for SRC -- I should have gone with my initial thinking of
using the same for both.
Thanks.
-- Kevin
On 4/24/2020 8:46 AM, Alexey Ushakov wrote:
> Thanks, Kevin!
>
> I’m updating the code according your comments. The only problem with your fix is the failure of test/jdk/java/awt/image/DrawImage/IncorrectUnmanagedImageRotatedClip.java regression test. It works with TRANSLUCENT compatible images in SRC mode.
>
> We still need blending even in SRC mode.
>
> - (jboolean)isBlendingDisabled:(jboolean)isSrcOpaque {
>
> // We need to check both extra alpha and isSrcOpaque for
> // SRC mode for correct handling TRANSLUCENT images.
> // See test/jdk/java/awt/image/DrawImage/IncorrectUnmanagedImageRotatedClip.java
> // for example
> if (_compositeRule == java_awt_AlphaComposite_SRC ||
> _compositeRule == java_awt_AlphaComposite_SRC_OVER)
> {
> return FLT_GE(_extraAlpha, 1.0f) && isSrcOpaque;
> }
> return isSrcOpaque;
> }
>
>
> Best Regards,
> Alexey
>
>> On 24 Apr 2020, at 02:34, Kevin Rushforth <kcr at openjdk.java.net> wrote:
>>
>> This fixed a bug where blending won't be used for SRC_OVER alpha composite mode in cases where there is a non-zero
>> alpha in the source, but the extra alpha in the alpha composite is 1.
>>
>> The evaluation is in the JBS issue. I'll file a follow-up issue for a couple things I discovered while looking into
>> this.
>>
>> -------------
>>
>> Commit messages:
>> - 8243505: SRC_OVER alpha composite mode doesn't render correctly
>>
>> Changes: https://git.openjdk.java.net/lanai/pull/37/files
>> Webrev: https://webrevs.openjdk.java.net/lanai/37/webrev.00
>> Issue: https://bugs.openjdk.java.net/browse/JDK-8243505
>> Stats: 38 lines in 3 files changed: 35 ins; 0 del; 3 mod
>> Patch: https://git.openjdk.java.net/lanai/pull/37.diff
>> Fetch: git fetch https://git.openjdk.java.net/lanai pull/37/head:pull/37
>>
>> PR: https://git.openjdk.java.net/lanai/pull/37
More information about the lanai-dev
mailing list