aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/org/gnu/emacs/EmacsSurfaceView.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/java/org/gnu/emacs/EmacsSurfaceView.java b/java/org/gnu/emacs/EmacsSurfaceView.java
index e9bae623930..2d80be0881a 100644
--- a/java/org/gnu/emacs/EmacsSurfaceView.java
+++ b/java/org/gnu/emacs/EmacsSurfaceView.java
@@ -79,10 +79,16 @@ public class EmacsSurfaceView extends View
79 79
80 if (bitmap != null && frontBuffer == null) 80 if (bitmap != null && frontBuffer == null)
81 { 81 {
82 frontBuffer = Bitmap.createBitmap (bitmap.getWidth (), 82 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
83 bitmap.getHeight (), 83 frontBuffer = Bitmap.createBitmap (bitmap.getWidth (),
84 Bitmap.Config.ARGB_8888, 84 bitmap.getHeight (),
85 false); 85 Bitmap.Config.ARGB_8888,
86 false);
87 else
88 frontBuffer = Bitmap.createBitmap (bitmap.getWidth (),
89 bitmap.getHeight (),
90 Bitmap.Config.ARGB_8888);
91
86 bitmapCanvas = new Canvas (frontBuffer); 92 bitmapCanvas = new Canvas (frontBuffer);
87 93
88 /* And copy over the bitmap contents. */ 94 /* And copy over the bitmap contents. */