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

Commit 93e87cf1 authored by John Reck's avatar John Reck Committed by android-build-merger
Browse files

Merge "Ensure picture isn't recording in createBitmap" into pi-dev am: c4f520dd

am: 39636318

Change-Id: If964e798cf39c03cb6d2232d103dbd7bf4941d5a
parents ac809dc4 39636318
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1229,6 +1229,7 @@ public final class Bitmap implements Parcelable {
        if (config == null) {
            throw new IllegalArgumentException("Config must not be null");
        }
        source.endRecording();
        if (source.requiresHardwareAcceleration() && config != Config.HARDWARE) {
            StrictMode.noteSlowCall("GPU readback");
        }
+3 −0
Original line number Diff line number Diff line
@@ -123,6 +123,9 @@ public class Picture {
     * drawn to a hardware-accelerated canvas. If this returns true then this Picture can only
     * be drawn to another Picture or to a Canvas where canvas.isHardwareAccelerated() is true.
     *
     * Note this value is only updated after recording has finished by a call to
     * {@link #endRecording()}. Prior to that it will be the default value of false.
     *
     * @return true if the Picture can only be drawn to a hardware-accelerated canvas,
     *         false otherwise.
     */