Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 547efb07 authored by Riley Andrews's avatar Riley Andrews Committed by Android Git Automerger
Browse files

am 9d68b243: am b2694cc3: Make return of screenshotApplications an ashmem immutable bitmap.

* commit '9d68b243':
  Make return of screenshotApplications an ashmem immutable bitmap.
parents 112bfce7 9d68b243
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -6380,10 +6380,9 @@ public class WindowManagerService extends IWindowManager.Stub
            }
        }

        // Copy the screenshot bitmap to another buffer so that the gralloc backed
        // bitmap will not have a long lifetime. Gralloc memory can be pinned or
        // duplicated and might have a higher cost than a skia backed buffer.
        Bitmap ret = bm.copy(bm.getConfig(),true);
        // Create a copy of the screenshot that is immutable and backed in ashmem.
        // This greatly reduces the overhead of passing the bitmap between processes.
        Bitmap ret = bm.createAshmemBitmap();
        bm.recycle();
        return ret;
    }