/*
 * Method:    Win32BBSD_Dispose
 */
void
Win32BBSD_Dispose(JNIEnv *env, SurfaceDataOps *ops)
{
    // ops is assumed non-null as it is checked in SurfaceData_DisposeOps
    Win32SDOps *wsdo = (Win32SDOps*)ops;
    J2dTraceLn(J2D_TRACE_INFO, "Win32BBSD_Dispose");
    if (wsdo->lpSurface != NULL && !wsdo->surfaceLost) {
        delete wsdo->lpSurface;
        wsdo->lpSurface = NULL;
    }
    disposeOSSD_WSDO(env, wsdo);
}
예제 #2
0
/*
 * Method:    Win32OSSD_Dispose
 */
static void
Win32OSSD_Dispose(JNIEnv *env, SurfaceDataOps *ops)
{
    DTRACE_PRINTLN("Win32OSSD_Dispose");
    // REMIND: Need to delete a lot of other things here as well, starting
    // with the offscreen surface

    // ops is assumed non-null as it is checked in SurfaceData_DisposeOps
    Win32SDOps *wsdo = (Win32SDOps*)ops;
    if (wsdo->surfacePuntData.lpSurfaceVram) {
	delete wsdo->surfacePuntData.lpSurfaceVram;
    }
    if (wsdo->surfacePuntData.lpSurfaceSystem) {
	delete wsdo->surfacePuntData.lpSurfaceSystem;
    }
    if (wsdo->brush != NULL) {
	wsdo->brush->Release();
    }
    if (wsdo->pen != NULL) {
	wsdo->pen->Release();
    }
    wsdo->lpSurface = NULL;
    disposeOSSD_WSDO(env, wsdo);
}