1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-10 13:40:36 -08:00

Update Android port

* java/org/gnu/emacs/EmacsView.java (swapBuffers): Restore
missing damage rect code.
(onDetachedFromWindow): Remove redundant synchronization.
This commit is contained in:
Po Lu 2023-05-20 10:26:28 +08:00
parent b434d2e1e4
commit 181453285c

View file

@ -356,16 +356,23 @@ public final class EmacsView extends ViewGroup
damageRect = null;
/* Now see if there is a damage region. */
synchronized (damageRegion)
{
if (damageRegion.isEmpty ())
return;
/* And extract and clear the damage region. */
damageRect = damageRegion.getBounds ();
damageRegion.setEmpty ();
bitmap = getBitmap ();
/* Transfer the bitmap to the surface view, then invalidate
it. */
surfaceView.setBitmap (bitmap, damageRect);
surfaceView.setBitmap (bitmap, damageRect);
}
}
@ -545,20 +552,17 @@ public final class EmacsView extends ViewGroup
{
isAttachedToWindow = false;
synchronized (this)
{
/* Recycle the bitmap and call GC. */
/* Recycle the bitmap and call GC. */
if (bitmap != null)
bitmap.recycle ();
if (bitmap != null)
bitmap.recycle ();
bitmap = null;
canvas = null;
surfaceView.setBitmap (null, null);
bitmap = null;
canvas = null;
surfaceView.setBitmap (null, null);
/* Collect the bitmap storage; it could be large. */
Runtime.getRuntime ().gc ();
}
/* Collect the bitmap storage; it could be large. */
Runtime.getRuntime ().gc ();
super.onDetachedFromWindow ();
}