They are used by libRSDriver and libRS_internal which are VNDK-SP
libraries. Therefore, the EGL/GLES libs must be LLNDK or VNDK-SP. We
choose to make them as LLNDK since they already have stable ABIs (as
they are NDK).
In addition, two more functions of libEGL are exposed to vendors
eglQueryStringImplementationANDROID and eglDupNativeFenceFDANDROID are
non-NDK symbols but are being used by libgui, which is a library marked
with vendor_available:true. In order to provide the symbols to the
library, they are added to the map.txt file and tagged as "# vndk" so
that they are exposed only when built for vendor libs (and hidden when
built for NDK).
Furthermore, eglQueryStringImplementationANDROID is changed to C-symbol
in order to be mentioned in the map.txt file, where C++ mangled symbol
name can't be used.
Bug:
64425518
Test: BOARD_VNDK_VERSION=current m -j libRSDriver.vendor
Test: BOARD_VNDK_VERSION=current m -j libRS_internal.vendor
Change-Id: I4d5bcd5f72fb05a7908887f5192de70fd1d8c8f1
#include <utils/String8.h>
#include <utils/Trace.h>
-EGLAPI const char* eglQueryStringImplementationANDROID(EGLDisplay dpy, EGLint name);
+extern "C" EGLAPI const char* eglQueryStringImplementationANDROID(EGLDisplay dpy, EGLint name);
#define CROP_EXT_STR "EGL_ANDROID_image_crop"
#define PROT_CONTENT_EXT_STR "EGL_EXT_protected_content"
#define EGL_PROTECTED_CONTENT_EXT 0x32C0
#include <private/gui/SyncFeatures.h>
-EGLAPI const char* eglQueryStringImplementationANDROID(EGLDisplay dpy, EGLint name);
+extern "C" EGLAPI const char* eglQueryStringImplementationANDROID(EGLDisplay dpy, EGLint name);
namespace android {
#include <utils/Log.h>
#include <utils/Thread.h>
-EGLAPI const char* eglQueryStringImplementationANDROID(EGLDisplay dpy, EGLint name);
+extern "C" EGLAPI const char* eglQueryStringImplementationANDROID(EGLDisplay dpy, EGLint name);
#define CROP_EXT_STR "EGL_ANDROID_image_crop"
namespace android {
license: "include/KHR/NOTICE",
}
+llndk_library {
+ name: "libEGL",
+ symbol_file: "libs/libEGL.map.txt",
+ export_include_dirs: ["include"],
+}
+
+llndk_library {
+ name: "libGLESv1_CM",
+ symbol_file: "libs/libGLESv1_CM.map.txt",
+ export_include_dirs: ["include"],
+}
+
+llndk_library {
+ name: "libGLESv2",
+ symbol_file: "libs/libGLESv2.map.txt",
+ export_include_dirs: ["include"],
+}
+
+llndk_library {
+ name: "libGLESv3",
+ symbol_file: "libs/libGLESv3.map.txt",
+ export_include_dirs: ["include"],
+}
+
cc_library_headers {
name: "gl_headers",
vendor_available: true,
cc_defaults {
name: "egl_libs_defaults",
defaults: ["gl_libs_defaults"],
- vendor_available: true,
cflags: [
"-DLOG_TAG=\"libEGL\"",
],
cc_library_shared {
name: "libEGL",
defaults: ["egl_libs_defaults"],
- vndk: {
- enabled: true,
- },
srcs: [
"EGL/egl_tls.cpp",
"EGL/egl_cache.cpp",
cc_defaults {
name: "gles_libs_defaults",
defaults: ["gl_libs_defaults"],
- vendor_available: true,
arch: {
arm: {
instruction_set: "arm",
cc_library_shared {
name: "libGLESv2",
defaults: ["gles_libs_defaults"],
- vndk: {
- enabled: true,
- },
srcs: ["GLES2/gl2.cpp"],
cflags: ["-DLOG_TAG=\"libGLESv2\""],
}
return setError(EGL_BAD_PARAMETER, (const char *)0);
}
-EGLAPI const char* eglQueryStringImplementationANDROID(EGLDisplay dpy, EGLint name)
+extern "C" EGLAPI const char* eglQueryStringImplementationANDROID(EGLDisplay dpy, EGLint name)
{
clearError();
eglDestroyStreamKHR; # introduced=23
eglDestroySurface;
eglDestroySyncKHR; # introduced-arm=18 introduced-arm64=21 introduced-mips=18 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
+ eglDupNativeFenceFDANDROID; # vndk
eglGetConfigAttrib;
eglGetConfigs;
eglGetCurrentContext;
eglQueryStreamTimeKHR; # introduced=23
eglQueryStreamu64KHR; # introduced=23
eglQueryString;
+ eglQueryStringImplementationANDROID; # vndk
eglQuerySurface;
eglReleaseTexImage;
eglReleaseThread;
#include <EGLUtils.h>
using namespace android;
-EGLAPI const char* eglQueryStringImplementationANDROID(EGLDisplay dpy, EGLint name);
+extern "C" EGLAPI const char* eglQueryStringImplementationANDROID(EGLDisplay dpy, EGLint name);
static void printGLString(const char *name, GLenum s) {
// fprintf(stderr, "printGLString %s, %d\n", name, s);
#include <utils/Errors.h>
#include <utils/String8.h>
-EGLAPI const char* eglQueryStringImplementationANDROID(EGLDisplay dpy, EGLint name);
+extern "C" EGLAPI const char* eglQueryStringImplementationANDROID(EGLDisplay dpy, EGLint name);
// ----------------------------------------------------------------------------
namespace android {
#include <vector>
#include <SurfaceFlinger.h>
-EGLAPI const char* eglQueryStringImplementationANDROID(EGLDisplay dpy, EGLint name);
+extern "C" EGLAPI const char* eglQueryStringImplementationANDROID(EGLDisplay dpy, EGLint name);
// ---------------------------------------------------------------------------
namespace android {
*/
#define DEBUG_SCREENSHOTS false
-EGLAPI const char* eglQueryStringImplementationANDROID(EGLDisplay dpy, EGLint name);
+extern "C" EGLAPI const char* eglQueryStringImplementationANDROID(EGLDisplay dpy, EGLint name);
namespace android {
*/
#define DEBUG_SCREENSHOTS false
-EGLAPI const char* eglQueryStringImplementationANDROID(EGLDisplay dpy, EGLint name);
+extern "C" EGLAPI const char* eglQueryStringImplementationANDROID(EGLDisplay dpy, EGLint name);
namespace android {
// ---------------------------------------------------------------------------