[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    [OpenJDK 2D-Dev] XRender pipeline - request for first review
From:       linuxhippy () gmail ! com (Clemens Eisserer)
Date:       2009-08-20 10:18:32
Message-ID: 194f62550908200318r365f0819r5c25081179b782b5 () mail ! gmail ! com
[Download RAW message or body]

Hi,

I've just put together a webref of the xrender pipeline-rewrite for a first
review.
Please ignore the content of the xrender-repo, I finally gave up on using hg
for this task.
Please take a look at the webref located at:
http://78.31.67.79:8080/jxrender/downloads/jxrender_20080820.zip

Many things are not as mature/clean as I wished they would be, and some
areas are just plain ugly ;) ... but I guess waiting any longer would just
increase the risk of missing JDK7.

The webref contains two small "fixes" required to make the JDK build on
Fedora-Rawhide, please ignore them for now.
The "pure-java" backend is for now experimental only and disabled by
default, as it is not well tested and requires some enhancements.

Thanks, Clemens

PS: below you find some kind of status-document with questions inside. would
be great if somebody could take a look at the open questions.


*Known bugs:*
1. CopyArea GC leak. It seems XRSurfaceDara.flush() is only called for
Pixmaps, even when overrriden in XRSurfaceData, is there any way to get a
notification when a window is disposed?

2. Sometimes I get bad XID errors for different operations.

3. How can that happen? Only loops for X11 destination surfaces have been
registered:
 Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException:
sun.awt.image.BufImgSurfaceData cannot be cast to
sun.java2d.xr.XRSurfaceData

       at
sun.java2d.xr.XRPMBlitLoops.cacheToTmpSurface(XRPMBlitLoops.java:154)

       at sun.java2d.xr.XrSwToPMBlit.Blit(XRPMBlitLoops.java:365)

       at sun.java2d.pipe.DrawImage.blitSurfaceData(DrawImage.java:953)

4. X11 automatic flush does not work (see e.g. Java2Demo, without
antialiasing, high delay).
Commands are flushed only when events occur or the output-buffer is full.

5. How does the SW->Surface blit behave, if tmp>source? (interpolation
issues??).
Possible solution: Simply set up source-rectangle, this will emulate surface
boundaries.


*TODO: *
- D3D pipeline needs adjustments to the new GlyphInfo structure (managed=1)
- Proprietary glyph scaler needs to initialize managed-field at GlyphInfo
initialition
- Implement tracing support (java2d.trace=log/count)


*Possible enhancements:*
- Improve blit-mask handling to save fillrate (use scaling without modifying
the mask contents if possible)
- Implement linear gradients using a 1xY temporary pixmap.


*System bugs/troubles:*
- XPutImage+Composite used for MaskFill is slow, especially on intel
- Rendering artifacts for TransformedBlits intel
- Uploading multiple glyphs at once crashes the XServer


*Open Questions: *

- How does pipeline initialization interier with font stuff?
Why does it need static initialization instead of how it is done for now?
(mark knows more about that, fixed it recently),

- How to install an appropriate ColorModel and use it, instead of
bit-twiddling with the pixel value we get?

- Is there a reliable way of detecting if a glpyh is LCD or grayscale? For
zero-width glyphs rowBytes==width doesn't do the trick.
For now, I upload a zero-width glyph as lcd, if GlyphList contains other lcd
glyphs.
Would streamline the code in some cases a bit.

- How does the pipeline behave on bgBlits? Does it fallback to sw loops, or
simply emulate the behaviour with a two-step operation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20090820/581fd2f8/attachment.html 

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic