2333 revalidateAll();
2334 fillpipe.fillRect(this, x, y, w, h);
2335 } catch (InvalidPipeException e2) {
2336 // Still catching the exception; we are not yet ready to
2337 // validate the surfaceData correctly. Fail for now and
2338 // try again next time around.
2339 }
2340 } finally {
2341 surfaceData.markDirty();
2342 }
2343 }
2344
2345 private void revalidateAll() {
2346 try {
2347 // REMIND: This locking needs to be done around the
2348 // caller of this method so that the pipe stays valid
2349 // long enough to call the new primitive.
2350 // REMIND: No locking yet in screen SurfaceData objects!
2351 // surfaceData.lock();
2352 surfaceData = surfaceData.getReplacement();
2353 if (surfaceData == null) {
2354 surfaceData = NullSurfaceData.theInstance;
2355 }
2356
2357 // this will recalculate the composite clip
2358 setDevClip(surfaceData.getBounds());
2359
2360 if (paintState <= PAINT_ALPHACOLOR) {
2361 validateColor();
2362 }
2363 if (composite instanceof XORComposite) {
2364 Color c = ((XORComposite) composite).getXorColor();
2365 setComposite(new XORComposite(c, surfaceData));
2366 }
2367 validatePipe();
2368 } finally {
2369 // REMIND: No locking yet in screen SurfaceData objects!
2370 // surfaceData.unlock();
2371 }
2372 }
2373
|
2333 revalidateAll();
2334 fillpipe.fillRect(this, x, y, w, h);
2335 } catch (InvalidPipeException e2) {
2336 // Still catching the exception; we are not yet ready to
2337 // validate the surfaceData correctly. Fail for now and
2338 // try again next time around.
2339 }
2340 } finally {
2341 surfaceData.markDirty();
2342 }
2343 }
2344
2345 private void revalidateAll() {
2346 try {
2347 // REMIND: This locking needs to be done around the
2348 // caller of this method so that the pipe stays valid
2349 // long enough to call the new primitive.
2350 // REMIND: No locking yet in screen SurfaceData objects!
2351 // surfaceData.lock();
2352 surfaceData = surfaceData.getReplacement();
2353 if (surfaceData == null || !surfaceData.isValid()) {
2354 surfaceData = NullSurfaceData.theInstance;
2355 }
2356
2357 // this will recalculate the composite clip
2358 setDevClip(surfaceData.getBounds());
2359
2360 if (paintState <= PAINT_ALPHACOLOR) {
2361 validateColor();
2362 }
2363 if (composite instanceof XORComposite) {
2364 Color c = ((XORComposite) composite).getXorColor();
2365 setComposite(new XORComposite(c, surfaceData));
2366 }
2367 validatePipe();
2368 } finally {
2369 // REMIND: No locking yet in screen SurfaceData objects!
2370 // surfaceData.unlock();
2371 }
2372 }
2373
|