Re: [Rev 02] RFR: 8234471: Canvas in webview displayed with wrong scale on Windows

2020-03-26 Thread Guru Hb
On Wed, 25 Mar 2020 18:12:41 GMT, Arun Joseph  wrote:

>> This bug can be reproduced when the screen resolution is at 125%, 150% and 
>> 175% for Windows, which correpsonds to
>> `pixelScale` values of 1.25, 1.5 and 1.75, respectively.
>> Issue: The rectangle inside canvas is rendered on `pixelScale` while the 
>> borders are rendered on `Math.ceil(pixelScale)`
>> 
>> Fix: Use `Math.ceil(pixelScale)` for calculating `pixelScaleTransform`
>
> Arun Joseph has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Updated test

Marked as reviewed by ghb (Reviewer).

-

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


Re: [Rev 02] RFR: 8234471: Canvas in webview displayed with wrong scale on Windows

2020-03-25 Thread Kevin Rushforth
On Wed, 25 Mar 2020 18:12:41 GMT, Arun Joseph  wrote:

>> This bug can be reproduced when the screen resolution is at 125%, 150% and 
>> 175% for Windows, which correpsonds to
>> `pixelScale` values of 1.25, 1.5 and 1.75, respectively.
>> Issue: The rectangle inside canvas is rendered on `pixelScale` while the 
>> borders are rendered on `Math.ceil(pixelScale)`
>> 
>> Fix: Use `Math.ceil(pixelScale)` for calculating `pixelScaleTransform`
>
> Arun Joseph has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Updated test

Marked as reviewed by kcr (Lead).

-

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


Re: [Rev 02] RFR: 8234471: Canvas in webview displayed with wrong scale on Windows

2020-03-25 Thread Arun Joseph
> This bug can be reproduced when the screen resolution is at 125%, 150% and 
> 175% for Windows, which correpsonds to
> `pixelScale` values of 1.25, 1.5 and 1.75, respectively.
> Issue: The rectangle inside canvas is rendered on `pixelScale` while the 
> borders are rendered on `Math.ceil(pixelScale)`
> 
> Fix: Use `Math.ceil(pixelScale)` for calculating `pixelScaleTransform`

Arun Joseph has updated the pull request incrementally with one additional 
commit since the last revision:

  Updated test

-

Changes:
  - all: https://git.openjdk.java.net/jfx/pull/62/files
  - new: https://git.openjdk.java.net/jfx/pull/62/files/ea422a78..eadff865

Webrevs:
 - full: https://webrevs.openjdk.java.net/jfx/62/webrev.02
 - incr: https://webrevs.openjdk.java.net/jfx/62/webrev.01-02

  Stats: 13 lines in 1 file changed: 8 ins; 5 del; 0 mod
  Patch: https://git.openjdk.java.net/jfx/pull/62.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/62/head:pull/62

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


Re: [Rev 01] RFR: 8234471: Canvas in webview displayed with wrong scale on Windows

2020-03-24 Thread Kevin Rushforth
On Tue, 25 Feb 2020 07:11:43 GMT, Arun Joseph  wrote:

>> This bug can be reproduced when the screen resolution is at 125%, 150% and 
>> 175% for Windows, which correpsonds to
>> `pixelScale` values of 1.25, 1.5 and 1.75, respectively.
>> Issue: The rectangle inside canvas is rendered on `pixelScale` while the 
>> borders are rendered on `Math.ceil(pixelScale)`
>> 
>> Fix: Use `Math.ceil(pixelScale)` for calculating `pixelScaleTransform`
>
> Arun Joseph has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Added CanvasTest

The fix looks good to me. I left one comment on the test.

tests/system/src/test/java/test/javafx/scene/web/CanvasTest.java line 125:

> 124: assertEquals("Rect bottom-right corner", redColor, 
> (int) webView.getEngine().executeScript(
> 125: 
> "document.getElementById('canvas').getContext('2d').getImageData(99, 99, 1, 
> 1).data[0]"));
> 126: webViewStateLatch.countDown();

An assertion failure here will not be propagated outside the listener. A 
failure will be reported as a timeout rather
than an assertion failure.

I recommend moving the above two assertion checks to a `Util.runAndWait` block 
at the end of this method -- after the
await call for `webViewStateLatch`.

-

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


Re: RFR: 8234471: Canvas in webview displayed with wrong scale on Windows

2020-03-23 Thread Kevin Rushforth
On Mon, 6 Jan 2020 04:42:54 GMT, Guru Hb  wrote:

>> This bug can be reproduced when the screen resolution is at 125%, 150% and 
>> 175% for Windows, which correpsonds to
>> `pixelScale` values of 1.25, 1.5 and 1.75, respectively.
>> Issue: The rectangle inside canvas is rendered on `pixelScale` while the 
>> borders are rendered on `Math.ceil(pixelScale)`
>> 
>> Fix: Use `Math.ceil(pixelScale)` for calculating `pixelScaleTransform`
>
> have you tested this on Linux and Mac by changing JVM option 
> -Dglass.win.uiScale=.

This looks like the correct fix, and I can confirm that it does fix the 
problem. I'll run a set of regression tests on
Windows 10 with 125% scaling (which is my normal environment) and then finish 
my review.

-

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


Re: [Rev 01] RFR: 8234471: Canvas in webview displayed with wrong scale on Windows

2020-02-24 Thread Arun Joseph
> This bug can be reproduced when the screen resolution is at 125%, 150% and 
> 175% for Windows, which correpsonds to `pixelScale` values of 1.25, 1.5 and 
> 1.75, respectively.
> 
> Issue: The rectangle inside canvas is rendered on `pixelScale` while the 
> borders are rendered on `Math.ceil(pixelScale)`
> 
> Fix: Use `Math.ceil(pixelScale)` for calculating `pixelScaleTransform`

The pull request has been updated with 1 additional commit.

-

Added commits:
 - ea422a78: Added CanvasTest

Changes:
  - all: https://git.openjdk.java.net/jfx/pull/62/files
  - new: https://git.openjdk.java.net/jfx/pull/62/files/fde17b8c..ea422a78

Webrevs:
 - full: https://webrevs.openjdk.java.net/jfx/62/webrev.01
 - incr: https://webrevs.openjdk.java.net/jfx/62/webrev.00-01

  Stats: 133 lines in 1 file changed: 133 ins; 0 del; 0 mod
  Patch: https://git.openjdk.java.net/jfx/pull/62.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/62/head:pull/62

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


Re: RFR: 8234471: Canvas in webview displayed with wrong scale on Windows

2020-01-05 Thread Guru Hb
On Mon, 9 Dec 2019 13:09:04 GMT, Arun Joseph  wrote:

> This bug can be reproduced when the screen resolution is at 125%, 150% and 
> 175% for Windows, which correpsonds to `pixelScale` values of 1.25, 1.5 and 
> 1.75, respectively.
> 
> Issue: The rectangle inside canvas is rendered on `pixelScale` while the 
> borders are rendered on `Math.ceil(pixelScale)`
> 
> Fix: Use `Math.ceil(pixelScale)` for calculating `pixelScaleTransform`

have you tested this on Linux and Mac by changing JVM option 
-Dglass.win.uiScale=.

-

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


RFR: 8234471: Canvas in webview displayed with wrong scale on Windows

2019-12-09 Thread Arun Joseph
This bug can be reproduced when the screen resolution is at 125%, 150% and 175% 
for Windows, which correpsonds to `pixelScale` values of 1.25, 1.5 and 1.75, 
respectively.

Issue: The rectangle inside canvas is rendered on `pixelScale` while the 
borders are rendered on `Math.ceil(pixelScale)`

Fix: Use `Math.ceil(pixelScale)` for calculating `pixelScaleTransform`

-

Commits:
 - fde17b8c: 8234471: Canvas in webview displayed with wrong scale on Windows

Changes: https://git.openjdk.java.net/jfx/pull/62/files
 Webrev: https://webrevs.openjdk.java.net/jfx/62/webrev.00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8234471
  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jfx/pull/62.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/62/head:pull/62

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