diff --git a/graphics/java/android/graphics/Bitmap.java b/graphics/java/android/graphics/Bitmap.java index 0ff958fdadd53..c6f841505e033 100644 --- a/graphics/java/android/graphics/Bitmap.java +++ b/graphics/java/android/graphics/Bitmap.java @@ -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"); } diff --git a/graphics/java/android/graphics/Picture.java b/graphics/java/android/graphics/Picture.java index 70306281514dc..f2d0227645a9b 100644 --- a/graphics/java/android/graphics/Picture.java +++ b/graphics/java/android/graphics/Picture.java @@ -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. */