diff options
| author | Po Lu <luangruo@yahoo.com> | 2024-04-23 14:30:38 +0800 |
|---|---|---|
| committer | Po Lu <luangruo@yahoo.com> | 2024-04-23 14:30:38 +0800 |
| commit | b9c191d690fd5d1480858469df23cc4509996fae (patch) | |
| tree | 2e0536607f1442a99e88e39af8d24c51bab45aeb /java/org/gnu/emacs/EmacsService.java | |
| parent | 63765a74f15ef22109750414ec3025c8a40039f0 (diff) | |
Implement face stipples on Android
* .gitignore:
* java/Makefile.in: Fix typos.
* java/org/gnu/emacs/EmacsFillRectangle.java (perform): Call
blitOpaqueStipple if filling an unobscured rectangle with an
opaque stipple.
* java/org/gnu/emacs/EmacsGC.java (EmacsGC) <tileObject>: New
field.
(markDirty): Synchronize the current stipple with tileObject.
(prepareStipple, blitOpaqueStipple): New functions.
* java/org/gnu/emacs/EmacsService.java (EmacsService)
<resources>: New static field.
(onCreate): Set it.
* src/android.c (android_create_bitmap_from_data): Correct order
of arguments to android_create_pixmap_from_bitmap_data.
(HAS_BUILTIN_TRAP): Delete macro.
(emacs_abort): Always induce backtraces by means of a NULL
pointer deference.
* src/dispextern.h (Emacs_GC, Emacs_Rectangle, GCForeground)
(GCBackground, GCFillStyle, GCStipple, FillOpaqueStipple)
[HAVE_ANDROID]: Define to their Android counterparts rather
than simulating their existence.
* src/epaths.in: Set bitmap path to /assets/bitmaps on Android.
* src/image.c (image_bitmap_pixmap): Also enable when
HAVE_ANDROID.
* src/sfntfont-android.c (sfntfont_android_put_glyphs): Assert
that this is never called to draw a stippled background.
* src/xfaces.c (x_create_gc) [HAVE_ANDROID]: Redefine as
wrapper around android_create_gc.
(prepare_face_for_display) [HAVE_ANDROID]: Enable stipples.
Diffstat (limited to 'java/org/gnu/emacs/EmacsService.java')
| -rw-r--r-- | java/org/gnu/emacs/EmacsService.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/java/org/gnu/emacs/EmacsService.java b/java/org/gnu/emacs/EmacsService.java index 2d4079c11b0..8e459ce4cdc 100644 --- a/java/org/gnu/emacs/EmacsService.java +++ b/java/org/gnu/emacs/EmacsService.java @@ -64,6 +64,7 @@ import android.content.pm.PackageManager; import android.content.res.AssetManager; import android.content.res.Configuration; +import android.content.res.Resources; import android.hardware.input.InputManager; @@ -146,6 +147,9 @@ public final class EmacsService extends Service thread. */ private Thread mainThread; + /* "Resources" object required by GContext bookkeeping. */ + public static Resources resources; + static { servicingQuery = new AtomicInteger (); @@ -238,10 +242,11 @@ public final class EmacsService extends Service super.onCreate (); SERVICE = this; + resources = getResources (); handler = new Handler (Looper.getMainLooper ()); manager = getAssets (); app_context = getApplicationContext (); - metrics = getResources ().getDisplayMetrics (); + metrics = resources.getDisplayMetrics (); pixelDensityX = metrics.xdpi; pixelDensityY = metrics.ydpi; tempScaledDensity = ((getScaledDensity (metrics) |
