RFR: 8090547: Allow for transparent backgrounds in WebView [v4]

Jose Pereda jpereda at openjdk.java.net
Fri Aug 27 09:35:28 UTC 2021


On Wed, 25 Aug 2021 23:23:00 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

>> Jose Pereda has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Update cssref.html
>
> modules/javafx.web/src/main/java/com/sun/javafx/webkit/prism/WCGraphicsPrismContext.java line 459:
> 
>> 457:     public void setClip(WCRectangle c) {
>> 458:         if (!isOpaque) {
>> 459:             clearRect((int)c.getX(), (int)c.getY(),
> 
> Are you sure that there are no ill effects from clearing the rectangle every time a clip is set on a non-opaque context? This seems like a surprising side effect.

Initially, this was needed when there was some level of transparency: when scrolling the old content was not cleared and you could see it at its old position.

For the full transparency case, this is still the case, but for translucent colors (0 < opacity < 1) I can't reproduce it anymore, so I'll modify this to apply only `if (isTransparent) { clearRect(); }`.

I don't see a performance drop because of this.

-------------

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


More information about the openjfx-dev mailing list