diff options
| author | Po Lu | 2023-05-27 15:19:02 +0800 |
|---|---|---|
| committer | Po Lu | 2023-05-27 15:19:02 +0800 |
| commit | d33bf0a0afddb76598aa020f68402d0e19cfb65c (patch) | |
| tree | 574041305595fb2fdb3bc481632fe56c9e25b1b5 /java/org/gnu | |
| parent | cdca0fddcc3352bcd01bec147c264be1b2a04e12 (diff) | |
| download | emacs-d33bf0a0afddb76598aa020f68402d0e19cfb65c.tar.gz emacs-d33bf0a0afddb76598aa020f68402d0e19cfb65c.zip | |
Remove synchronization around `damageRegion'
* java/org/gnu/emacs/EmacsView.java (EmacsView, swapBuffers):
Remove unnecessary documentation. `damageRegion' is only
changed from the Emacs thread.
Diffstat (limited to 'java/org/gnu')
| -rw-r--r-- | java/org/gnu/emacs/EmacsView.java | 26 |
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 |