[OpenJDK 2D-Dev] [9] Review Request: 8167310 The graphics clip is incorrectly rounded for some fractional scales

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Mon Oct 10 22:53:34 UTC 2016

On 11.10.16 1:23, Phil Race wrote:
>> Yes, I think adjacent drawImage requests should not overlap.  We
>> should look into this separately.
> So previously, overlapping of the clip bounds ensured adjacent images
> were not drawn
> over-lapped .. but with this fix they might be ?

The fix change only behavior of the rectangle clip. So using the setClip 
we can prevent overlaping of the images. But i think that even without 
clip such images should not overlap.

>> On the other hand, we normalize differently for AA and non-AA. Calling
>> getFillSSI() on LoopPipe basically performs normalization only for
>> non-AA fills.  Arguably, though, clipping produces non-AA results in
>> that it chooses whole pixels to include or exclude. This might mean
>> that it should never follow AA normalization.
> That last sentence sounds like the right answer in principle but I don't
> know if we'll be unpleasantly surprised
> by some  consequence of "... that setClip(Shape) and fill(Shape) might
> disagree .."

I just tested fillRect vs fill(RectShape), and both work differently in 
some cases as well-=((.
So we have a few similar methods which works differently(even if 
VALUE_STROKE_PURE is set), which became visible on fractional(1.5) 
  - setClip(Rectangle)
  - setClip(Shape)
  - fillRect(Rectangle)
  - fill(Shape)
  - DrawImage(Rectangle)

Best regards, Sergey.

More information about the 2d-dev mailing list