Re: [OpenJDK 2D-Dev] Strange text rendering with SRC + Extra Alpha

2010-10-29 Thread Phil Race
I didn't get time to look at this yesterday. I think the problem is (sort of) in SunGraphics2D.setComposite() where we have } } else if (newCompType == CompositeType.SrcNoEa || newCompType == CompositeType.Src || newCompType

Re: [OpenJDK 2D-Dev] Strange text rendering with SRC + Extra Alpha

2010-10-29 Thread Phil Race
This fixes it, although the same may need to be done to OGL and D3D subclasses of SurfaceData.java -phil. diff --git a/src/share/classes/sun/java2d/SurfaceData.java b/src/share/classes/sun/java2d/SurfaceData.java --- a/src/share/classes/sun/java2d/SurfaceData.java +++

Re: [OpenJDK 2D-Dev] Strange text rendering with SRC + Extra Alpha

2010-10-29 Thread Jim Graham
Why is SRC with an extra alpha handled any differently than SrcNoEa with a color that has alpha? The two cases are supposed to be folded together because it doesn't matter where the alpha comes from. There is also a paintType indicator that indicates when the paint is opaque. If you only

Re: [OpenJDK 2D-Dev] Strange text rendering with SRC + Extra Alpha

2010-10-29 Thread Jim Graham
If you allow ALPHACOLOR (paintState = ALPHACOLOR) then you should be able to handle Src with EA... ...jim On 10/29/10 12:49 PM, Phil Race wrote: This fixes it, although the same may need to be done to OGL and D3D subclasses of SurfaceData.java -phil. diff --git

Re: [OpenJDK 2D-Dev] Strange text rendering with SRC + Extra Alpha

2010-10-29 Thread Phil Race
On 10/29/2010 1:00 PM, Jim Graham wrote: Why is SRC with an extra alpha handled any differently than SrcNoEa with a color that has alpha? The two cases are supposed to be folded together because it doesn't matter where the alpha comes from. There is also a paintType indicator that indicates

Re: [OpenJDK 2D-Dev] Strange text rendering with SRC + Extra Alpha

2010-10-29 Thread Phil Race
And in fact that is handled as the greyscale and lcd text loops use the alpha component of the alpha colour on the graphics and SG2D appears to take care of this in calculating the argb color. And the garbage problem is due to a bug in surfacedata where that earlier b17 fix I mentioned tested

[OpenJDK 2D-Dev] Strange text rendering with SRC + Extra Alpha

2010-10-27 Thread Clemens Eisserer
Hi, While playing arround with the SRC composition rule I found what seems to be a bug. When rendering text with an AlphaComposite(SRC, EA) I get garbage when enabling subpixel antialising: g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC, 0.01f));

Re: [OpenJDK 2D-Dev] Strange text rendering with SRC + Extra Alpha

2010-10-27 Thread Denis Lila
Hi Clemens. It's interesting to note that this doesn't happen on OpenJDK, and on closed java the subpixel hint is not necessary to reproduce this. Simply using VALUE_ANTIALIAS_ON and the SRC composite is enough. Regards, Denis. - Clemens Eisserer linuxhi...@gmail.com wrote: Hi, While

Re: [OpenJDK 2D-Dev] Strange text rendering with SRC + Extra Alpha

2010-10-27 Thread Clemens Eisserer
Hi Denis, It's interesting to note that this doesn't happen on OpenJDK, and on closed java the subpixel hint is not necessary to reproduce this. Simply using VALUE_ANTIALIAS_ON and the SRC composite is enough. I have to enable lcd text antialising to get the described result, however I see it

Re: [OpenJDK 2D-Dev] Strange text rendering with SRC + Extra Alpha

2010-10-27 Thread Phil Race
This is getting a bit puzzling .. what I see sounds more like what Denis is seeing. Are you using the X11 pipeline or Xrender ? I'm using X11. -phil. On 10/27/2010 3:27 PM, Clemens Eisserer wrote: Hi Denis, It's interesting to note that this doesn't happen on OpenJDK, and on closed java