Skip to content
Commit ca8aef63 authored by Leon Scroggins III's avatar Leon Scroggins III
Browse files

Remove bitmap::getBitmapAllocationByteCount

Test: I7eb02bc2389aadc10ee0b65993bb7e2dab27a129

Also remove gBitmap_getAllocationByteCountMethodID. These called into
Java, which then called back into native. Instead, call the native method
directly. The only extra wrinkle is that the Java method returns 0
if (mRecycled). But we would never reach that return value, since if
it was recycled, we would have crashed in native Bitmap::assertValid.
Instead, throw an IllegalArgumentException when attempting to reuse
it.

This avoids the overhead of two JNI calls, which tend to be slow.

Change-Id: I29e8d2428036252cfad532b1351e3a3d33817b43
parent 3111cff3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment