[OpenJDK 2D-Dev] Integration of the xrender pipeline rewite
Phil Race
Phil.Race at Sun.COM
Tue Oct 27 23:22:10 UTC 2009
I think the main barrier to pushing this is not so much the pipeline code itself,
and whether it works 100% (since it would be off by default) but
making sure it is architecturally sound and doesn't break anything that exists.
I have a very few superficial comments from my quick look at a few files
that are *changed*.
X11SurfaceData and the glyph caching changes need a slightly longer
look. I do note we'd need to make some closed source changes to
match some of it.
1) src/share/classes/sun/font/FontManager.java
shows that this isn't synced with Roman's refactoring.
Shouldn't be a big deal though as you only change
one line and I don't think even that line should be changed
where you changed an array size from 20 to 50 :
>private static CompositeFont [] compFonts = new CompositeFont[50];
I can't guess how x render defines new logical fonts.
2) src/share/classes/sun/java2d/pipe/AAShapePipe.java
imports sun.java2d.pisces.*
but doesn't (and shouldn't) do this directly, and
also has new CairoRenderingEngine(); //.getInstance();
I'm not sure what's intended here. Obviously it
shouldn't directly instantiate that here, but also
I don't even see this class in the webrev.
3) src/share/classes/sun/java2d/pipe/RenderQueue.java
the size change from 32000 to 12000 probably should be explained :
75 private static final int BUFFER_SIZE = 12000;
4) src/share/classes/sun/java2d/pisces/PiscesRenderingEngine.java
This is just adding white space ..
5) The makefiles introduce a compile time dependency on libxrender.so
which I believe should be fine for any *nix platform we'd consider
supporting in JDK 7+ and should also be OK on our build platforms.
6) src/solaris/native/sun/awt/awt_GraphicsEnv.c
What was wrong with using the #define here ?
969 if (xerr->minor_code == X_ShmAttach) {
->
969 if (xerr->minor_code == 1) {
-phil.
Clemens Eisserer wrote:
> Hello again,
>
> I am sorry, but currently I can't spend a lot of time working on the
> integration of the xrender pipeline.
> I am well aware the code isn't production ready, and sometimes just
> plain ugly ;)
>
> There are some global changes, most touching glyph handling, because
> the xrender glyph cache logic is written in plain java, and e.g. it
> wasn't possible to get notifications of glyph disposal on pure java
> code as far as I have seen.
> It would be cool to get comments on that stuff first, the other things
> could follow piece by piece later.
> I did some changes in the OGL pipeline, but I don't have windows, so
> D3D changes are missing, as well as the proprietary scaler
> modifications.
>
> The webrev is located at: http://93.83.133.214/glyph_changes_001.zip
>
> The changes are in:
>> StrikeCache.java
>> fontscalerdefs.h
>> freetypeScaler.c
>> sunFont.c
>> OGLTextRenderer.c
>> GlyphDisposedListener.java
>
> The only overhead I can see if the additional locking in freeXMemory,
> the structure itself should remain at the same size (using otherwise
> unused padding).
>
> Any idea wether this requirement could be solved more elegant / efficient?
>
> Thank you in advance, Clemens
More information about the 2d-dev
mailing list