You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by Thomas E Deweese <th...@kodak.com> on 2001/02/03 17:31:17 UTC
[Commit] feDisplacementMap, Pattern/feTile, and tiling!!
My commit message failed since it was too large! :)
Here is the header and the log. I suggest 'cvs diff' if you want to
see particular changes, and if you want the whole thing I can mail you
the bounced message (and hope it doesn't bounce again).
---
deweese 01/02/03 08:26:21
Modified: sources/org/apache/batik/apps/regard Main.java
sources/org/apache/batik/apps/regsvggen Main.java
sources/org/apache/batik/ext/awt
LinearGradientPaintContext.java
RenderingHintsKeyExt.java
sources/org/apache/batik/ext/awt/image GraphicsUtil.java
sources/org/apache/batik/ext/awt/image/renderable
ClipRable8Bit.java CompositeRable8Bit.java
DisplacementMapOp.java
DisplacementMapRable8Bit.java FloodRable8Bit.java
GaussianBlurOp.java PadRable8Bit.java
SVGComposite.java TileRable8Bit.java
sources/org/apache/batik/ext/awt/image/rendered
AbstractRed.java AffineRed.java
BufferedImageCachableRed.java PadRed.java
TileRed.java
sources/org/apache/batik/gvt AbstractGraphicsNode.java
CompositeGraphicsNode.java PatternPaint.java
PatternPaintContext.java
sources/org/apache/batik/gvt/filter
GraphicsNodeRable8Bit.java
sources/org/apache/batik/gvt/renderer StaticRenderer.java
sources/org/apache/batik/svggen
AbstractImageHandlerEncoder.java
ImageHandlerBase64Encoder.java NullOp.java
sources/org/apache/batik/swing JSVGCanvas.java
sources/org/apache/batik/transcoder/image
ImageTranscoder.java
Added: sources/org/apache/batik/ext/awt BufferedImageHintKey.java
sources/org/apache/batik/ext/awt/image/rendered
LRUCache.java TileCache.java TileGenerator.java
TileGrid.java TileLRUMember.java TileMap.java
TileStore.java TranslateRed.java
sources/org/apache/batik/gvt/filter GraphicsNodeRed8Bit.java
Log:
1) The deepest architectural change is a strong move towards tiling
everything. GraphicsNodeRable now returns a GraphicsNodeRed that
is a tiled representation of the entire GraphicsNode. This is then
rendered on demand. For a variety of reasons this can be slower
than the pre-existing code in some cases, and _much_ faster in
others (panning around documents that use filters for example).
This still needs more work, but what I'm checking in is currently
fairly comparable to the pre-existing code performance wise and
still offers significant low-hanging fruit for further improvement.
One thing that I plan on doing very soon is modifying the renderer
To use the caching code, this will make panning in large documents
fairly snappy (we might even be able to pull off interactive redraw
in most cases, based on a few tests).
2) Pattern/feTile this code has been completely reworked. The new
code appears to be faster in a number of cases, and is comparable
in the rest.
3) feDisplacementMap this has also been heavily reworked. The default
implementation now uses Bi-Linear interpolation.
samples/tests/feDisplacementMap.svg looks a little better, but the
BE test looks sweet (no more jaggies)!
The Anti-aliased code is a bit slower than the original code, (it
still has room to improve with the techniques I used for the
Nearest Neighbor code) I have left in a Nearest Neighbor version
that is at least 2x as fast as the original code. I also reworked
to code so it only generates the region of output needed (this is
very close to a tiled implementation and should carry over nicely).
Eventually which method is used should be controlled by a hint.
4) 'createGraphics'. I have added a createGraphics method to
GraphicsUtils, along with a number of 'getDevice*' calls. These
methods work together to ensure that information about the
destination is available when using a Graphics2D. I have replaced
most usages of BufferedImage.createGraphics with the equivalent
call to GraphicsUtils.createGraphics. In some instances where the
graphics was only used for very short lived work (g.dispose was
called shortly afterwords) I didn't bother to introduce the
dependency on GraphicsUtils.
I think this will help to squash the constantly re-occuring bugs
where things are not properly converted to/from linear sRGB.