[OpenJDK 2D-Dev] [PATCH] SurfaceManagerFactory
Dmitri.Trembovetski at Sun.COM
Tue Feb 26 10:00:39 PST 2008
the change looks mostly fine to me.
One thing - have you tested your change with the
Because it has its own GraphicsEnvironment class,
and it would appear that you'd need to set appropriate
SMF in there too.
Now what would that "appropriate SMF" be is a question.
I would suggest to return a BufImgVolatileSurfaceManager.
I don't remember if it is present in jdk7 tree, but if it's
not, it's just a simple subclass of VISM that returns
null from initAccelSurface() and false from isAccelerationEnabled().
Roman Kennke wrote:
> I'm implementing a Java2D backend based on Escher, which is already
> working quite well (for a couple-of-hours-prototype):
> One issue I came over is the SurfaceManagerFactory. There seems to be
> such a factory class both in the solaris and windows source trees, but
> no way to provide an own implementation. Therefore I propose the
> attached change. This basically turns the SurfaceManagerFactory into an
> abstract class, now in the shared tree, with appropriate subclasses in
> the windows and solaris trees. The GraphicsEnvironment implementations
> are now responsible for initializing and setting the appropriate factory
> in their static initializers. What do you think? I was thinking about a
> different approach first, using yet another system property to determine
> the right factory, but this seemed more natural.
> Cheers, Roman
More information about the 2d-dev