Disable hardware acceleration on Android

It serves no purpose and causes tearing.  Uploading the bitmap
to the GPU takes about as long as it does to incrementally
update the surface in software.

* java/AndroidManifest.xml.in: Disable hardware acceleration.
* java/org/gnu/emacs/EmacsActivity.java (EmacsActivity): Make
lastClosedMenu static.
* java/org/gnu/emacs/EmacsDialog.java (toAlertDialog): Enable
hardware acceleration within alert dialogs.
* java/org/gnu/emacs/EmacsSurfaceView.java (onDraw): Describe
why hardware acceleration is disabled.
* java/org/gnu/emacs/EmacsWindow.java (run): Remove redundant
call.
This commit is contained in:
Po Lu
2023-07-13 12:05:50 +08:00
parent 4e2fda28ed
commit 140755f2cf
5 changed files with 39 additions and 4 deletions

View File

@@ -77,10 +77,14 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. -->
@ANDROID_SHARED_USER_ID@
android:extractNativeLibs="true">
<!-- See EmacsSurfaceView.onDraw for why hardware acceleration is
disabled. -->
<activity android:name="org.gnu.emacs.EmacsActivity"
android:launchMode="singleInstance"
android:windowSoftInputMode="adjustResize"
android:exported="true"
android:hardwareAccelerated="false"
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@@ -173,6 +177,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. -->
<activity android:name="org.gnu.emacs.EmacsMultitaskActivity"
android:windowSoftInputMode="adjustResize"
android:exported="true"
android:hardwareAccelerated="false"
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"/>
<activity android:autoRemoveFromRecents="true"