mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-04 11:00:45 -08:00
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.
This commit is contained in:
parent
65829b27ca
commit
16831e290e
5 changed files with 83 additions and 13 deletions
|
|
@ -1784,4 +1784,32 @@ public final class EmacsWindow extends EmacsHandleObject
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Miscellaneous functions for debugging graphics code. */
|
||||
|
||||
/* Recreate the activity to which this window is attached, if any.
|
||||
This is nonfunctional on Android 2.3.7 and earlier. */
|
||||
|
||||
public void
|
||||
recreateActivity ()
|
||||
{
|
||||
final EmacsWindowAttachmentManager.WindowConsumer attached;
|
||||
|
||||
attached = this.attached;
|
||||
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB)
|
||||
return;
|
||||
|
||||
view.post (new Runnable () {
|
||||
@Override
|
||||
public void
|
||||
run ()
|
||||
{
|
||||
if (attached instanceof EmacsActivity)
|
||||
((EmacsActivity) attached).recreate ();
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue