summaryrefslogtreecommitdiff
path: root/java/org/gnu/emacs/EmacsView.java
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2023-05-27 15:19:02 +0800
committerPo Lu <luangruo@yahoo.com>2023-05-27 15:19:02 +0800
commitd33bf0a0afddb76598aa020f68402d0e19cfb65c (patch)
tree574041305595fb2fdb3bc481632fe56c9e25b1b5 /java/org/gnu/emacs/EmacsView.java
parentcdca0fddcc3352bcd01bec147c264be1b2a04e12 (diff)
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/emacs/EmacsView.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
public void
damageRect (Rect damageRect)
{
- synchronized (damageRegion)
- {
- damageRegion.union (damageRect);
- }
+ damageRegion.union (damageRect);
}
/* This method is called from both the UI thread and the Emacs
@@ -358,22 +355,19 @@ public final class EmacsView extends ViewGroup
/* Now see if there is a damage region. */
- synchronized (damageRegion)
- {
- if (damageRegion.isEmpty ())
- return;
+ if (damageRegion.isEmpty ())
+ return;
- /* And extract and clear the damage region. */
+ /* And extract and clear the damage region. */
- damageRect = damageRegion.getBounds ();
- damageRegion.setEmpty ();
+ damageRect = damageRegion.getBounds ();
+ damageRegion.setEmpty ();
- bitmap = getBitmap ();
+ bitmap = getBitmap ();
- /* Transfer the bitmap to the surface view, then invalidate
- it. */
- surfaceView.setBitmap (bitmap, damageRect);
- }
+ /* Transfer the bitmap to the surface view, then invalidate
+ it. */
+ surfaceView.setBitmap (bitmap, damageRect);
}
@Override