diff options
author | 2018-03-21 16:48:19 +0000 | |
---|---|---|
committer | 2018-03-21 16:48:19 +0000 | |
commit | d848f75f9955c80209e2cd163993cfbe76f76f51 (patch) | |
tree | 314751544037937d9f04974e425081d7c23b9008 /graphics/java | |
parent | f344b3ead51d3ac96c60223cbc9a4a0bc7c61576 (diff) | |
parent | eb3b38e22cb29c6a7fccb7031263f50663cc76d0 (diff) |
Merge "Report native allocation size of AnimatedImageDrawable" into pi-dev
Diffstat (limited to 'graphics/java')
-rw-r--r-- | graphics/java/android/graphics/drawable/AnimatedImageDrawable.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/graphics/java/android/graphics/drawable/AnimatedImageDrawable.java b/graphics/java/android/graphics/drawable/AnimatedImageDrawable.java index c0f49208e27e..a47ecf517c70 100644 --- a/graphics/java/android/graphics/drawable/AnimatedImageDrawable.java +++ b/graphics/java/android/graphics/drawable/AnimatedImageDrawable.java @@ -292,8 +292,7 @@ public class AnimatedImageDrawable extends Drawable implements Animatable2 { mState = new State(nCreate(nativeImageDecoder, decoder, width, height, cropRect), inputStream, afd); - // FIXME: Use the right size for the native allocation. - long nativeSize = 200; + final long nativeSize = nNativeByteSize(mState.mNativePtr); NativeAllocationRegistry registry = new NativeAllocationRegistry( AnimatedImageDrawable.class.getClassLoader(), nGetNativeFinalizer(), nativeSize); registry.registerNativeAllocation(mState, mState.mNativePtr); |