Details
-
Bug
-
Resolution: Fixed
-
P3
-
None
-
internal
Description
While fixing JDK-8243505 I discovered two somewwhat related problems with alpha blending and compositing. I left FIXME comments in the code as part of my fix.
1. The FLT_LE and FLT_GE macros are wrong -- or at least they don't do what their name implies. They should be fixed and then all callers should be looked at to make sure that they are still correct (at least one looked wrong to me, in addition to the one I changed to not use it).
2. The isBlendingDisabled function should be re-examined. Depending on the composite mode, I think it needs to either look at both or neither of the extra alpha value and isSrcOpaque variables. For example, I don't think SRC or CLEAR mode needs blending at all (but maybe that is handled elsewhere). And other modes would need to look at both or they will have the same bug I just fixed for SRC_OVER.
1. The FLT_LE and FLT_GE macros are wrong -- or at least they don't do what their name implies. They should be fixed and then all callers should be looked at to make sure that they are still correct (at least one looked wrong to me, in addition to the one I changed to not use it).
2. The isBlendingDisabled function should be re-examined. Depending on the composite mode, I think it needs to either look at both or neither of the extra alpha value and isSrcOpaque variables. For example, I don't think SRC or CLEAR mode needs blending at all (but maybe that is handled elsewhere). And other modes would need to look at both or they will have the same bug I just fixed for SRC_OVER.
Attachments
Issue Links
- relates to
-
JDK-8242653 Lanai: SRC_OVER with extra alpha does not work for VI
- Resolved
-
JDK-8243505 SRC_OVER alpha composite mode doesn't render correctly
- Resolved