Open ngoquang2708 opened 6 years ago
Well, I have done all stuffs you mentioned, except not closing the hnd->fd
And from what you've observed, since the FB device is opened 2 times (first is to open to check if fb device exist, second time is to get buffer data from it, idk why), not closing fb handle will cause fd leaks. That's the first caveat
Second, it is clear that libui will use HIDL's implementation of importBuffer
method, as you can see in the callback function. Still, for now we have no choice other than forcing it not to use the shared fd, and instead directly get the mapped fb fd. Touching shared fd will cause stupid behavior of mali
Mali uses ION fd with default ION implementation, that's why we have to close fd
https://gist.github.com/ngoquang2708/184dc1f24ccaf66dbd0bc075e19bb6e2