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

Commit 9d68b243 authored by Riley Andrews's avatar Riley Andrews Committed by Android Git Automerger
Browse files

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

* commit 'b2694cc3':
  Make return of screenshotApplications an ashmem immutable bitmap.
parents 625c8271 b2694cc3
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;
    }