protected D3DSurfaceData(
      WComponentPeer peer,
      D3DGraphicsConfig gc,
      int width,
      int height,
      Image image,
      ColorModel cm,
      int numBackBuffers,
      int swapEffect,
      VSyncType vSyncType,
      int type) {
    super(getCustomSurfaceType(type), cm);
    this.graphicsDevice = gc.getD3DDevice();
    this.peer = peer;
    this.type = type;
    this.width = width;
    this.height = height;
    this.offscreenImage = image;
    this.backBuffersNum = numBackBuffers;
    this.swapEffect = swapEffect;
    this.syncType = vSyncType;

    initOps(graphicsDevice.getScreen(), width, height);
    if (type == WINDOW) {
      // we put the surface into the "lost"
      // state; it will be restored by the D3DScreenUpdateManager
      // prior to rendering to it for the first time. This is done
      // so that vram is not wasted for surfaces never rendered to
      setSurfaceLost(true);
    } else {
      initSurface();
    }
    setBlitProxyKey(gc.getProxyKey());
  }