How to use GraphicBuffer in android ndk

陌路散爱 提交于 2019-11-30 13:43:36

I am working on this problem these days, too.

Many blogs said a copy of Android source code is needed to link along with your project. I believe it's more elegant to get function from libui.so in runtime, which is the "alternative approach" mentioned by Aleksandar Stojiljkovic.

I have written a simple library to do that. Here is it.

Unfortunately, it got removed from here but you could get some answers there: http://community.arm.com/groups/arm-mali-graphics/blog/2013/10/24/eglimage--updating-a-texture-without-copying-memory-under-android

In short, you'll need to build Android platform code and create library that would wrap access to GraphicBuffer and required API and build against android code base. As other stated, you'll need to maintain the library...

This is an alternative approach: https://code.google.com/p/chromium/codesearch#chromium/src/third_party/deqp/src/framework/platform/android/tcuAndroidInternals.cpp&l=167

GraphicBuffer is in the namespace android.

Either add:

using namespace android;

or refer to GraphicBuffer with android::GraphicBuffer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!