]> git.eshelyaron.com Git - emacs.git/commit
Avert race condition between window attachment and buffer swap
authorPo Lu <luangruo@yahoo.com>
Fri, 26 Jan 2024 03:24:51 +0000 (11:24 +0800)
committerEshel Yaron <me@eshelyaron.com>
Fri, 26 Jan 2024 11:23:31 +0000 (12:23 +0100)
commit8e6d5d0ce8501b6e2b2c43a79f29706d35f6dbe8
treed33f74e307236cffbca30abfcd2d09b8f6d33ede
parente83d7d446dcb417ba73b35ef9c8f4d46f76016ce
Avert race condition between window attachment and buffer swap

* java/org/gnu/emacs/EmacsView.java (swapBuffers): Synchronize
such that code cannot execute between the bitmap's being loaded
and being transferred to surfaceView.
(onDetachedFromWindow): Recycle bitmap after the surface view is
reset.

* java/org/gnu/emacs/EmacsWindow.java (recreateActivity):

* src/android.c (android_init_emacs_window)
(android_recreate_activity):

* src/androidfns.c (Fandroid_recreate_activity)
(syms_of_androidfns): New functions for debugging window
attachment.

* src/androidgui.h: Update prototypes.

(cherry picked from commit 16831e290ed29f5f70dfe144ec63c583527485e8)
java/org/gnu/emacs/EmacsView.java
java/org/gnu/emacs/EmacsWindow.java
src/android.c
src/androidfns.c
src/androidgui.h