> These are 2 corner case test cases for getRenderRoot() method.
> 1. `emptyDirtyRegion():` When the dirty region rect is empty i.e. (0, 0, -1, 
> -1)
> 2. `zeroSizeDirtyRegionWithinOpaqueRegion()`: When the dirty region rect is 
> of zero dimensions, for example (20, 20, 0, 0)
> 
> - emptyDirtyRegion(): When the dirty region rect is empty i.e. (0, 0, -1, -1)
> See `RectBounds.makeEmpty()` and `RectBounds.isEmpty()` for definition of an 
> empty rect. It seems logical to NOT to perform any rendering when dirty 
> region is an empty rect. But current behavior is that when empty dirty region 
> rect is passed to `root.getRenderRoot()`, it returns the root itself in 
> NodePath.
> The commit#1 can correct/change this behavior to return an empty NodePath. 
> Commit#1 is only for reference, the change is NGNode.java is a product change 
> which is out of scope of this fix. I shall file a new JBS issue to handle 
> this case.
> The test `emptyDirtyRegion1` is modified and another 
> variant(`emptyDirtyRegion2`) of test is added. Additionally a new similar 
> test (`invalidDirtyRegionOutsideOpaqueRegion`) is also included which passes 
> an invalid rect. I think the behavior of this case should also be same as 
> that of empty rect. All these three tests shall be ignored using the new JBS.
> 
> - zeroSizeDirtyRegionWithinOpaqueRegion(): When the dirty region rect is of 
> zero dimensions, for example (20, 20, 0, 0)
> The dirty rect has 0 width and height but from the methods 
> `RectBounds.makeEmpty()` and `RectBounds.isEmpty()` we can infer that the 
> rect(20, 20, 0, 0) is not an empty rect. (It may be considered as a dirty 
> point). So if we consider this rect as a valid dirty region then the current 
> behavior seems valid. I have added a couple more similar tests.

Ambarish Rapte has updated the pull request incrementally with one additional 
commit since the last revision:

  update ignore tags with jbs id

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

Changes:
  - all: https://git.openjdk.java.net/jfx/pull/463/files
  - new: https://git.openjdk.java.net/jfx/pull/463/files/37f83768..a9525f89

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jfx&pr=463&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jfx&pr=463&range=00-01

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

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

Reply via email to