public static WGLOffScreenSurfaceData createData(WComponentPeer peer,Image image,int type){
  if (!peer.isAccelCapable() || !SunToolkit.isContainingTopLevelOpaque((Component)peer.getTarget())) {
    return null;
  }
  WGLGraphicsConfig gc=getGC(peer);
  Rectangle r=peer.getBounds();
  if (type == FLIP_BACKBUFFER) {
    return new WGLOffScreenSurfaceData(peer,gc,r.width,r.height,image,peer.getColorModel(),type);
  }
 else {
    return new WGLVSyncOffScreenSurfaceData(peer,gc,r.width,r.height,image,peer.getColorModel(),type);
  }
}

public static WGLOffScreenSurfaceData createData ( WComponentPeer peer , Image image , int type ) { if ( ! peer . isAccelCapable ( ) || ! SunToolkit . isContainingTopLevelOpaque ( ( Component ) peer . getTarget ( ) ) ) { return null ; } WGLGraphicsConfig gc = getGC ( peer ) ; Rectangle r = peer . getBounds ( ) ; if ( type == FLIP_BACKBUFFER ) { return new WGLOffScreenSurfaceData ( peer , gc , r . width , r . height , image , peer . getColorModel ( ) , type ) ; } else { return new WGLVSyncOffScreenSurfaceData ( peer , gc , r . width , r . height , image , peer . getColorModel ( ) , type ) ; } }
creates a surfacedata object representing the back buffer of a double - buffered on - screen window .
