[OpenJDK 2D-Dev] RFR: 8240342: Custom composite is ignored when printing an opaque image to a page
Philip Race
philip.race at oracle.com
Wed Apr 1 00:42:42 UTC 2020
On 3/31/20, 4:57 PM, Sergey Bylokhov wrote:
> Hi, Phil.
>
> Why the "AlphaComposite.SRC_OVER" is counted as "non-compositing" mode?
This is copied from share/classes/sun/print/PeekMetrics.java.
It means that the normal drawing path can handle it.
>
> 1904 if (alpha != 1.0
> 1905 || (rule != AlphaComposite.SRC
> 1906 && rule != AlphaComposite.SRC_OVER))
> 1907 {
> 1908 isCompositing = true;
> 1909 }
>
> On 3/31/20 1:37 pm, Philip Race wrote:
>> The fix is in code used on Linux/Solaris and Windows only.
>> The Mac printing path is quite different and was not affected.
>
> I have run the test on macOS 10.15 and it fails by the same reason:
> "Exception in thread "main" java.lang.RuntimeException: Compose
> called 0times. Expected at least 2"
>
>
This makes no sense to me. I ran the test on all platforms and it passed.
Are you sure you tested on a build with the fix ?
And the test as written exercises no Mac printing code.
So are you misunderstanding my comment ?
The bug does not affect printing to the real PRINTER on Mac but does
affect the code path
exercised by the test.
-phil.
More information about the 2d-dev
mailing list