[OpenJDK 2D-Dev] [PATCH] SurfaceManagerFactory

Dmitri Trembovetski Dmitri.Trembovetski at Sun.COM
Tue Feb 26 18:00:39 UTC 2008

   Hi Roman,

   the change looks mostly fine to me.

   One thing - have you tested your change with the
   headless toolkit?

   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:
> Hello,
> I'm implementing a Java2D backend based on Escher, which is already
> working quite well (for a couple-of-hours-prototype):
> http://kennke.org/blog/2008/02/25/escher-on-openjdk-graphics/
> 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 mailing list