[OpenJDK 2D-Dev] RFR 8148886: SEGV in sun.java2d.marlin.Renderer._endRendering

Jim Graham james.graham at oracle.com
Wed Feb 10 21:41:47 UTC 2016


I was thinking the same thing with respect to the 2 current cases we are 
looking at, that's why I suggested the 2 types.  But, it could be 
situational.  It may be rare to have reentrancy for these objects, but 
other cases might encounter reentrant cases more often.  It couldn't 
hurt to have the 2 constructors since the single refType constructor 
would just be a 1-liner:

public ProviderTL(refType) { this(refType, refType); }
or?
public ProviderTL(refType) { this(refType, WEAK); }
?

			...jim

On 2/10/16 1:36 PM, Laurent Bourgès wrote:
> Jim
>
> 2016-02-10 22:32 GMT+01:00 Jim Graham <james.graham at oracle.com
> <mailto:james.graham at oracle.com>>:
>
>     One suggestion on ProviderTL - have a constructor overload that
>     allows separate ref types for the TL and the CLQ references in case
>     there is a situation where you want a hard reference for the primary
>     context and a soft reference for the reentrant ones (which may be
>     situationally rare).  The single refType constructor would use the
>     same refType for both cases...
>
>
> It is a good idea. I am preparing a new webrev and I slightly changed my
> mind:
> - TL references are defined using the given ref type (hard, soft or weak)
> - CLQ references are always weak to reduce the memory footprint
>
> I think it is better to have weaker references for the CLQ as it is less
> important.
>
> Do you still need a new constructor with 2 different ref types ?
>
> Laurent



More information about the 2d-dev mailing list