What replaces GraphicBuffer on Android 7.0?

To quickly transfer texels to / from the EGL surface, we successfully used the GraphicBuffer buffer as described in this thread: How to use GraphicBuffer in android ndk

However, on Android 7.0 this is not an option. Because GraphicBuffer uses the private library libui.so. So what replaces it? What is the Google Approved EGL Surface Fast Transfer Method?

+5
source share
1 answer

In Android 8 (API level 26), the upcoming release of Oreo, they have implemented a hardware buffer shell . I compared the HardwareBuffer and GraphicBuffer classes, providing an interface for creating and accessing a shared buffer object, where the new HardwareBuffer is a generic version of GraphicBuffer. Therefore, you will no longer need to reference non-public libraries from API 26+.

The only alternative I've seen for Android 7 is to manually provide all the necessary libraries for the apk project.

We will have to wait for Android 8 to be released after the beta phase. The roadmap for the release can be found here , the expected release is some time until the end of 2017. If you plan to update your project using the new API before the release date and want to check it out, you can use the Android O preview version on your Google device.

+2
source

Source: https://habr.com/ru/post/1261603/


All Articles