[OpenJDK 2D-Dev] hg: jdk7/2d/jdk: 6670881: Phantom lines appear when rendering polygons ellipses with antialiasing OFF

2010-10-29 Thread andrew . brygin
Changeset: d9890d8a8159 Author:bae Date: 2010-10-29 11:49 +0400 URL: http://hg.openjdk.java.net/jdk7/2d/jdk/rev/d9890d8a8159 6670881: Phantom lines appear when rendering polygons ellipses with antialiasing OFF Reviewed-by: prr, bae !

[OpenJDK 2D-Dev] Java's definition of the SRC operator

2010-10-29 Thread Clemens Eisserer
Hi, Some users reported problems with the IntelliJ Idea's editor when running with xrender enabled. It turned out that there are some differences between how Java and xrender interpret the SRC operator. Is the general rule, that SRC behaves like SRC_OVER when antialiasing is enabled? Are there

Re: [OpenJDK 2D-Dev] Java's definition of the SRC operator

2010-10-29 Thread Jim Graham
SRC behaves like SRC, but AA is another part of the equation. It works like this (for any rule): blendresult = PORTER_DUFF(rule, rendercolor, dstcolor, extraalpha) // For SRC, blendresult = rendercolor modulated by extra alpha storedresult = INTERP(dstcolor, blendresult, aacoverage) // For

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] Java's definition of the SRC operator

2010-10-29 Thread Clemens Eisserer
Hi Jim, blendresult = PORTER_DUFF(rule, rendercolor, dstcolor, extraalpha) // For SRC, blendresult = rendercolor modulated by extra alpha storedresult = INTERP(dstcolor, blendresult, aacoverage) // For full aa coverage, storedresult = blendresult The only part of this that could possibly be

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