/* * Class: sun_java2d_d3d_D3DBackBufferSurfaceData * Method: restoreDepthBuffer * Signature: ()V */ JNIEXPORT void JNICALL Java_sun_java2d_d3d_D3DBackBufferSurfaceData_restoreDepthBuffer(JNIEnv *env, jobject sData) { Win32SDOps *wsdo = Win32SurfaceData_GetOpsNoSetup(env, sData); J2dTraceLn1(J2D_TRACE_INFO, "D3DBBSD_restoreDepthBuffer: wsdo=0x%x", wsdo); if (wsdo != NULL) { if (!DDRestoreSurface(wsdo)) { // Failure - throw exception J2dRlsTraceLn(J2D_TRACE_ERROR, "D3DBBSD_restoreDepthBuffer: failed to "\ "restore depth buffer"); SurfaceData_ThrowInvalidPipeException(env, "RestoreDepthBuffer failure"); } } }
/* * Class: sun_awt_windows_Win32OffScreenSurfaceData * Method: restoreSurface * Signature: ()V */ JNIEXPORT void JNICALL Java_sun_awt_windows_Win32OffScreenSurfaceData_restoreSurface(JNIEnv *env, jobject sData) { DTRACE_PRINTLN("native method Win32OSSD_RestoreSurface: restoring offscreen"); Win32SDOps *wsdo = (Win32SDOps *)SurfaceData_GetOps(env, sData); // Might have gotten here by some default action. Make sure that the // surface is marked as lost before bothering to try to restore it. if (!wsdo->surfaceLost) { return; } // Attempt to restore and lock the surface (to make sure the restore worked) if (DDRestoreSurface(wsdo) && DDLock(env, wsdo, NULL, NULL)) { DDUnlock(env, wsdo); wsdo->surfaceLost = FALSE; } else { // Failure - throw exception DTRACE_PRINTLN("Win32OSSD_restoreSurface: problems restoring"); SurfaceData_ThrowInvalidPipeException(env, "RestoreSurface failure"); } }