3 ms·
As someone who has written a lot of code (including driver level) in the DirectX realm, that line (about not unlocking surfaces) gave me a minor aneurysm though
by georgemcbay 12y ago
As someone who has written a lot of code (including driver level) in the DirectX realm, that line (about not unlocking surfaces) gave me a minor aneurysm though I admittedly do not know enough about the Android ashmem internals to know if the reaction is actually warranted or not on the Android platform.
- realrocker 12y agoWell allocating on ashmen does reduce the UI lag since its just a memory pool and espaces GC reprimand but it's definitely not safe. Such operations are better handled at Gralloc/HWComposer Layer where you have a better handle on what's going on. Someone's gotta unlock that surface!
- on_and_off 12y agoI have written my fair share of code in the Android realm and that line gave my an aneurysm as well. To be fair, I think that Bitmap handling is one of Android's weaknesses and that it is far too easy to fragment or overflow your heap with Bitmaps.