[OpenJDK 2D-Dev]  Review request for 8023794: [macosx] LCD Rendering hints seems not working without FRACTIONALMETRICS=ON
andrew.brygin at oracle.com
Fri Dec 12 17:11:46 UTC 2014
at the moment, I failed to get acceptable results for rendering to
I am playing with an idea to fall back to grayscale AA on non-opaque
pixels (or pixels with
opacity less than a certain threshold) directly in the lcd shader program.
For now, there is an updated version of the fix which supports lcd
text in OGL pipeline
for a case of alpha paint and default composite. However, the case of
destination is not supported yet, that makes lcd text unavailable in
All changes specific for this version are in OGLSurfaceData.java and
Rest of the fix is unchanged.
Of course, this version may affect the performance of lcd text
I have no numbers to estimate the effect at the moment. In the worst case,
we can consider to use two different programs: one for opaque paint
to preserve performance), and another (like published now) for the
case of alpha
Please take a look.
On 10/25/2014 12:03 AM, Phil Race wrote:
> On 10/24/2014 10:56 AM, Andrew Brygin wrote:
>> please take a look to updated version of the fix:
>> TODOs were removed:
>> * CGLSurfaceData.java
>> the condition for lcd rendering is inherited from OGL surface
>> data, but
>> here we have to remove the check for the transparency, because
>> we always
>> create transparent volatile images for swing backbuffers on
>> macosx in order
>> to support shaped windows.
> Are you saying its created translucent regardless, or only if its shaped?
> But if its really translucent/transparent under the text, then
> IIRC the shaders - and s/w loops - do not properly handle that case.
> You probably should try drawing LCD text over a fully transparent area
> to see what happens.
>> * * *CGGlyphImages.m and AWTStrike.m
>> NSException is used to handle invalid (unevaluated) text
>> antialising hint values.
>> We actually have already used NSException to handle memory
>> allocation failure,
>> so this change just makes usage of get/release of primitive
>> arrays a bit more safe.
>> Known differences comparing to apple jdk6:
>> a) we do not interpret TEXT_ANTIALIASING_ON as lcd text.
> Its should never have meant that, else you would have no way to
> request grey scale.
>> b) we do not render lcd text in a case of non-opaque paint. This
>> behavior is common for
>> all cases (software loops, OGL, and D3D), so it seems to deserve
>> a separate bug if we
>> want to handle this case.
> I think that's another manifestation of the issue mentioned above.
More information about the 2d-dev