[OpenJDK Rasterizer] Marlin renderer contribution for review

Laurent Bourgès bourges.laurent at gmail.com
Thu Mar 19 17:09:32 UTC 2015


Jim,

> I would have solved this by having a RenderContext.getRenderer(clip,
rule) method in which case you would write:
>
> r = rdrCtx.getRenderer(clip.getLoX(), ..., pi.getWindingRule());
>
> RenderContext.getRenderer() would initialize the renderer and return it.
In the general case, that leaves the RenderContext object open to new ways
to manage cached instances in the future should our needs change since the
cache management logic is internal to the object...

It looks better but in practice there are many other reused instances in a
RendererContext that need initialization too.

For performance my current approach make a single call to
getRendererContext () that uses TL or CLQ for context storage and handles
once the liveness check: Hard / Soft / Weak references.

I wonder if your approach would lead to many calls to TL.get () ...

I agree it is not very clean but just efficient.

Laurent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/graphics-rasterizer-dev/attachments/20150319/4fb42f4b/attachment.html>


More information about the graphics-rasterizer-dev mailing list