JDK-8015606 : Text is not rendered correctly if destination buffer is custom
Type:Bug
Component:client-libs
Sub-Component:2d
Affected Version:6u45,7u21,8
Priority:P3
Status:Resolved
Resolution:Fixed
OS:generic
CPU:generic
Submitted:2013-05-29
Updated:2013-12-17
Resolved:2013-05-31
The Version table provides details related to the release that this issue/RFE will be addressed.
Unresolved : Release in which this issue/RFE will be addressed. Resolved: Release in which this issue/RFE has been resolved. Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.
Text is not rendered correctly if destination buffer has a custom type.
Attached test demonstrates the problem.
The problem seems to exist from early jdk5 time, or even earlier.
Comments
The problem seems to exist for a long time. Our generic
implementation of DrawGlyphList
and DrawGlyphListAA produce incorrect results if we render to
custom buffer and the graphics instance has non-null clip.
The root cause of disappeared text is incorrect usage of the clip
region form a SunGraphics2D instance for filling temporary
surface in generic implementation of MaskFill: with applied clip,
we leave a significant part of (or even whole) temporary surface
blank what results in missed text in the destination buffer.
Probably, there are other primitives that can be affected by the
problem.
Suggested fix is do not use the clip for the preparation of the
temporary surface.