@@ -258,7 +258,7 @@ public Graphics2D createGraphics(SurfaceData sd,
258
258
{
259
259
if (!done && sd instanceof D3DWindowSurfaceData ) {
260
260
D3DWindowSurfaceData d3dw = (D3DWindowSurfaceData )sd ;
261
- if (!d3dw .isSurfaceLost () || validate (d3dw , false )) {
261
+ if (!d3dw .isSurfaceLost () || validate (d3dw )) {
262
262
trackScreenSurface (d3dw );
263
263
return new SunGraphics2D (sd , fgColor , bgColor , font );
264
264
}
@@ -452,7 +452,7 @@ public void run() {
452
452
} finally {
453
453
rq .unlock ();
454
454
}
455
- } else if (!validate (sd , true )) {
455
+ } else if (!validate (sd )) {
456
456
// it is possible that the validation may never
457
457
// succeed, we need to detect this and replace
458
458
// the d3dw surface with gdi; the replacement of
@@ -474,7 +474,7 @@ public void run() {
474
474
* @return true if surface wasn't lost or if restoration was successful,
475
475
* false otherwise
476
476
*/
477
- private boolean validate (D3DWindowSurfaceData sd , boolean postEvent ) {
477
+ private boolean validate (D3DWindowSurfaceData sd ) {
478
478
if (sd .isSurfaceLost ()) {
479
479
try {
480
480
sd .restoreSurface ();
@@ -491,9 +491,7 @@ private boolean validate(D3DWindowSurfaceData sd, boolean postEvent) {
491
491
sd .markClean ();
492
492
// since the surface was successfully restored we need to
493
493
// repaint whole window to repopulate the back-buffer
494
- if (postEvent ) {
495
- repaintPeerTarget (sd .getPeer ());
496
- }
494
+ repaintPeerTarget (sd .getPeer ());
497
495
} catch (InvalidPipeException ipe ) {
498
496
return false ;
499
497
}
0 commit comments