[OpenJDK 2D-Dev] X11 uniform scaled wide lines and dashed lines; STROKE_CONTROL in Pisces

Jim Graham james.graham at oracle.com
Mon Nov 8 18:57:10 UTC 2010


It's still a work in progress, but I've cleaned up a lot of logic and 
made it faster in a number of ways.  Note that I've abstracted out the 
cache stuff and created an "AlphaConsumer" interface which may evolve 
over time.

In FX we actually consume alphas in larger chunks than the code in JDK 
which was driven by Ductus's 32x32 mandate, so I would have had to make 
completely incompatible changes to emitRow - so I moved it behind an 
interface.  For the JDK code, if you want to integrate this version, I 
would have the cache implement the new interface and move your version 
of emitRow into the Cache object.  I'd send you the new code for my 
AlphaConsumer, but it is incompatible with what you need to cache so it 
won't help you.

You'll also need a bit of un-translation cleanup as we have mirrors of 
all of java.awt.geom with special new APIs that FX needs.

			...jim

On 11/8/2010 6:40 AM, Denis Lila wrote:
> Hi Jim.
>
>> Also, I've gotten another 20% improvement out of the design with a few
>> more tweaks.  (Though I measured the 20% in the stripped down version
>> that I'm prototyping with FX so I'm not sure how much of that 20%
>> would show up through the layers of the 2D code.  Overall, I've about
>> doubled the frame rates of the prototype since your first drop that you
>> checked in to the OpenJDK repository.)
>
> Can I see your new version?

Attached.

>> How about looking more at the stroking end of the process and I'll dig
>> a little more into optimal rasterization code.  I have a lot of
>> experience with optimizing rasterizer code (and JNI if it comes to that), but
>> very little with the curve manipulations involved in stroking (math is so
>> *hard* at my age ;-)...
>
> Sounds good. Have you implemented your idea of processing one pixel row at a
> time, as opposed to processing subpixel rows? If not, I could do that.

Not yet.  Right now I've gotten a lot of mileage out of a few tweaks of 
the bookkeeping of the sample-row-at-a-time version.  I'm still mulling 
over exactly how to make that go faster.

				...jim
-------------- next part --------------
A non-text attachment was scrubbed...
Name: AlphaConsumer.java
Type: text/x-java
Size: 386 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20101108/2ac62290/AlphaConsumer.java>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPiscesRenderer.java
Type: text/x-java
Size: 22742 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20101108/2ac62290/OpenPiscesRenderer.java>


More information about the 2d-dev mailing list