[OpenJDK 2D-Dev] One or many GraphicsConfiguration(s) per toplevel?
Anthony.Petrov at Sun.COM
Thu Jan 22 11:04:34 UTC 2009
On 01/21/2009 10:23 PM Anthony Petrov wrote:
> Yeah, I see the point. Another option is to make the field private,
> create a final package-private getter (though why? we have a lovely
> public one already), and private setter. The setter would be invoked
> through the sun.awt.AWTAccessor by the toplevel window whenever its own
> GC gets changed (holding the TreeLock and traversing the whole
> hierarchy). It will also be assigned when adding a component to a
> container (by using the container's local copy of the gc - which we
> assume correct). This way we ensure there's only one value of gc in
> every single component in the given toplevel window at any moment of
> time. I guess changing the GC is not quite frequent operation to worry
> much about the performance of this approach?
By the way, Canvases may be created with a non-default GC. How should
these be treated then if we think we should have the same GC for every
component in a Window?
More information about the 2d-dev