[OpenJDK 2D-Dev] [2D-Dev] Review Request: JDK-8015070: Antialiased text on translucent backgrounds gets bright artifacts

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Tue Mar 22 12:50:43 UTC 2016

Just curious, is the approach in SRCOVER_MASKFILL faster? I think yes, 
but it adds and an additional branches which can affect performance. Did 
you measure the difference?

On 22.03.16 14:35, Prahalad Kumar Narayanan wrote:
> Observation from SRCOVER_MASKFILL
>      1.  The mask fill reduces computations by through multiple if(...) conditions.
>                    Each if condition affirms whether the next set of computations are required.
>      2.  Optimization 1: If mask value is 0- skip entire logic.
>      3.  Optimization 2: If mask value is maximum, say 255, take srcA directly without multiplying with maskAlpha ( Reason: 1 * srcAlpha = srcAlpha )
>      4.  Optimization 3: Compute pre-multiplied resColor in two steps. First with srcColor and then with dstColor.
>                    If the resAlpha from 1st step (i.e., srcColor) is fully opaque, avoid blending dstColor altogether.

Best regards, Sergey.

More information about the 2d-dev mailing list