aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/org/gnu/emacs/EmacsView.java26
1 files changed, 10 insertions, 16 deletions
diff --git a/java/org/gnu/emacs/EmacsView.java b/java/org/gnu/emacs/EmacsView.java
index 124ea5301bb..eb1d88ae242 100644
--- a/java/org/gnu/emacs/EmacsView.java
+++ b/java/org/gnu/emacs/EmacsView.java
@@ -338,10 +338,7 @@ public final class EmacsView extends ViewGroup
338 public void 338 public void
339 damageRect (Rect damageRect) 339 damageRect (Rect damageRect)
340 { 340 {
341 synchronized (damageRegion) 341 damageRegion.union (damageRect);
342 {
343 damageRegion.union (damageRect);
344 }
345 } 342 }
346 343
347 /* This method is called from both the UI thread and the Emacs 344 /* This method is called from both the UI thread and the Emacs
@@ -358,22 +355,19 @@ public final class EmacsView extends ViewGroup
358 355
359 /* Now see if there is a damage region. */ 356 /* Now see if there is a damage region. */
360 357
361 synchronized (damageRegion) 358 if (damageRegion.isEmpty ())
362 { 359 return;
363 if (damageRegion.isEmpty ())
364 return;
365 360
366 /* And extract and clear the damage region. */ 361 /* And extract and clear the damage region. */
367 362
368 damageRect = damageRegion.getBounds (); 363 damageRect = damageRegion.getBounds ();
369 damageRegion.setEmpty (); 364 damageRegion.setEmpty ();
370 365
371 bitmap = getBitmap (); 366 bitmap = getBitmap ();
372 367
373 /* Transfer the bitmap to the surface view, then invalidate 368 /* Transfer the bitmap to the surface view, then invalidate
374 it. */ 369 it. */
375 surfaceView.setBitmap (bitmap, damageRect); 370 surfaceView.setBitmap (bitmap, damageRect);
376 }
377 } 371 }
378 372
379 @Override 373 @Override