RFR: 8218973: SVG with masking is not rendering image with mask effect [v12]

Bhawesh Choudhary bchoudhary at openjdk.java.net
Mon Sep 14 14:28:12 UTC 2020

On Fri, 11 Sep 2020 00:13:48 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

>> Bhawesh Choudhary has updated the pull request incrementally with one additional commit since the last revision:
>>   Added unit test for strokes
> modules/javafx.web/src/main/java/com/sun/javafx/webkit/prism/WCGraphicsPrismContext.java line 524:
>> 522:         }
>> 523:         if (isFill) {
>> 524:             g1.fill(shape);
> This will call the slower `fill(Shape)` method in all cases rather than the specialized `fillRect` or `fillRoundRect`
> method. Given all the other things that are done to draw a shape with a clip mask, I suspect that this is fine. One
> thing to consider is to pass in an enum instead of a boolean. The enum could say whether to use the specialized calls
> or the generic `fill` call. It's probably not worth the effort to make this change.

other than paths only RoundRectangle2D is passed to this function. Shape can be checked if it is an instance of
RoundRectangle2D and faster draw api can be called. added the same along with enum private to this class.

> modules/javafx.web/src/test/java/test/javafx/scene/web/SVGTest.java line 164:
>> 162:             final WebPage webPage = WebEngineShim.getPage(getEngine());
>> 163:             assertNotNull(webPage);
>> 164:             final BufferedImage img = WebPageShim.paint(webPage, 0, 0, 200, 200);
> This is added to the (preexisting) problem of calling `paint` on the wrong thread. In this case, it doesn't seem to
> cause any additional problems, and other tests in this same class do it, so we can fix this in the follow-on issue that
> is already filed, [JDK-8252596](https://bugs.openjdk.java.net/browse/JDK-8252596).

moved tests to system test. also consolidated all tests into one.


PR: https://git.openjdk.java.net/jfx/pull/213

More information about the openjfx-dev mailing list