[OpenJDK 2D-Dev] [9] Review Request: Cleanup of sun.java2d.pipe.Region

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Thu May 12 19:04:17 UTC 2016


Can somebody take a look to the proposed cleanup of 
sun.java2d.pipe.Region. When I worked on some bugs I got a situation 
when I tried to change the Region object via a different set methods. 
But these changes are ignored because the reference was to 
ImmutableRegion which replaces all setter to no-op methods.

In the fix I propose to remove specific ImmutableRegion class, and make 
the whole Region class immutable:
  - setXX methods are removed, since most of them are unused.
  - the new getInstance(int box[], SpanIterator) was added, so the 
appendSpans() can be changed to the private.
  - small cleanup in equals, toString.

If the change will be approved I will file a corresponding CR.

Webrev can be found at: http://cr.openjdk.java.net/~serb/2d_cleanup/webrev

Best regards, Sergey.

More information about the 2d-dev mailing list