[-]
[+]
|
Changed |
_service:tar_git:libhybris.changes
|
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris.spec
^
|
|
[-]
[+]
|
Changed |
_service
^
|
@@ -1,8 +1,8 @@
<services>
<service name="tar_git">
- <param name="url">https://github.com/mer-hybris/libhybris.git</param>
- <param name="branch">master</param>
- <param name="revision">2e75e624bcc0da37b5bfe16e24c22c3328cf0d31</param>
+ <param name="url">https://github.com/sledges/libhybris.git</param>
+ <param name="branch">update20160329</param>
+ <param name="revision"></param>
<param name="token"/>
<param name="debian"/>
<param name="dumb"/>
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.17.1.tar.bz2/libhybris/hybris/egl/egl.c
^
|
@@ -38,8 +38,8 @@
#include <system/window.h>
#include "logging.h"
-static void *_libegl = NULL;
-static void *_libgles = NULL;
+static void *egl_handle = NULL;
+static void *glesv2_handle = NULL;
static void *_hybris_libgles1 = NULL;
static void *_hybris_libgles2 = NULL;
static int _egl_context_client_version = 1;
@@ -121,16 +121,26 @@
static void _init_androidegl()
{
- _libegl = (void *) android_dlopen(getenv("LIBEGL") ? getenv("LIBEGL") : "libEGL.so", RTLD_LAZY);
- _libgles = (void *) android_dlopen(getenv("LIBGLESV2") ? getenv("LIBGLESV2") : "libGLESv2.so", RTLD_LAZY);
+ egl_handle = (void *) android_dlopen(getenv("LIBEGL") ? getenv("LIBEGL") : "libEGL.so", RTLD_LAZY);
+ glesv2_handle = (void *) android_dlopen(getenv("LIBGLESV2") ? getenv("LIBGLESV2") : "libGLESv2.so", RTLD_LAZY);
+}
+
+static inline void hybris_egl_initialize()
+{
+ _init_androidegl();
+}
+
+static inline void hybris_glesv2_initialize()
+{
+ _init_androidegl();
}
static void * _android_egl_dlsym(const char *symbol)
{
- if (_libegl == NULL)
+ if (egl_handle == NULL)
_init_androidegl();
- return android_dlsym(_libegl, symbol);
+ return android_dlsym(egl_handle, symbol);
}
struct ws_egl_interface hybris_egl_interface = {
@@ -139,14 +149,7 @@
egl_helper_get_mapping,
};
-#define EGL_DLSYM(fptr, sym) do { if (_libegl == NULL) { _init_androidegl(); }; if (*(fptr) == NULL) { *(fptr) = (void *) android_dlsym(_libegl, sym); } } while (0)
-#define GLESv2_DLSYM(fptr, sym) do { if (_libgles == NULL) { _init_androidegl(); }; if (*(fptr) == NULL) { *(fptr) = (void *) android_dlsym(_libgles, sym); } } while (0)
-
-EGLint eglGetError(void)
-{
- EGL_DLSYM(&_eglGetError, "eglGetError");
- return (*_eglGetError)();
-}
+HYBRIS_IMPLEMENT_FUNCTION0(egl, EGLint, eglGetError);
#define _EGL_MAX_DISPLAYS 100
@@ -184,7 +187,7 @@
EGLDisplay eglGetDisplay(EGLNativeDisplayType display_id)
{
- EGL_DLSYM(&_eglGetDisplay, "eglGetDisplay");
+ HYBRIS_DLSYSM(egl, &_eglGetDisplay, "eglGetDisplay");
EGLNativeDisplayType real_display;
real_display = (*_eglGetDisplay)(EGL_DEFAULT_DISPLAY);
@@ -206,15 +209,11 @@
return real_display;
}
-EGLBoolean eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor)
-{
- EGL_DLSYM(&_eglInitialize, "eglInitialize");
- return (*_eglInitialize)(dpy, major, minor);
-}
+HYBRIS_IMPLEMENT_FUNCTION3(egl, EGLBoolean, eglInitialize, EGLDisplay, EGLint *, EGLint *);
EGLBoolean eglTerminate(EGLDisplay dpy)
{
- EGL_DLSYM(&_eglTerminate, "eglTerminate");
+ HYBRIS_DLSYSM(egl, &_eglTerminate, "eglTerminate");
struct _EGLDisplay *display = hybris_egl_display_get_mapping(dpy);
ws_Terminate(display);
@@ -223,40 +222,19 @@
const char * eglQueryString(EGLDisplay dpy, EGLint name)
{
- EGL_DLSYM(&_eglQueryString, "eglQueryString");
+ HYBRIS_DLSYSM(egl, &_eglQueryString, "eglQueryString");
return ws_eglQueryString(dpy, name, _eglQueryString);
}
-EGLBoolean eglGetConfigs(EGLDisplay dpy, EGLConfig *configs,
- EGLint config_size, EGLint *num_config)
-{
- EGL_DLSYM(&_eglGetConfigs, "eglGetConfigs");
- return (*_eglGetConfigs)(dpy, configs, config_size, num_config);
-}
-
-EGLBoolean eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list,
- EGLConfig *configs, EGLint config_size,
- EGLint *num_config)
-{
- EGL_DLSYM(&_eglChooseConfig, "eglChooseConfig");
- return (*_eglChooseConfig)(dpy, attrib_list,
- configs, config_size,
- num_config);
-}
-
-EGLBoolean eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config,
- EGLint attribute, EGLint *value)
-{
- EGL_DLSYM(&_eglGetConfigAttrib, "eglGetConfigAttrib");
- return (*_eglGetConfigAttrib)(dpy, config,
- attribute, value);
-}
+HYBRIS_IMPLEMENT_FUNCTION4(egl, EGLBoolean, eglGetConfigs, EGLDisplay, EGLConfig *, EGLint, EGLint *);
+HYBRIS_IMPLEMENT_FUNCTION5(egl, EGLBoolean, eglChooseConfig, EGLDisplay, const EGLint *, EGLConfig *, EGLint, EGLint *);
+HYBRIS_IMPLEMENT_FUNCTION4(egl, EGLBoolean, eglGetConfigAttrib, EGLDisplay, EGLConfig, EGLint, EGLint *);
EGLSurface eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config,
EGLNativeWindowType win,
const EGLint *attrib_list)
{
- EGL_DLSYM(&_eglCreateWindowSurface, "eglCreateWindowSurface");
+ HYBRIS_DLSYSM(egl, &_eglCreateWindowSurface, "eglCreateWindowSurface");
HYBRIS_TRACE_BEGIN("hybris-egl", "eglCreateWindowSurface", "");
struct _EGLDisplay *display = hybris_egl_display_get_mapping(dpy);
@@ -273,24 +251,12 @@
return result;
}
-EGLSurface eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config,
- const EGLint *attrib_list)
-{
- EGL_DLSYM(&_eglCreatePbufferSurface, "eglCreatePbufferSurface");
- return (*_eglCreatePbufferSurface)(dpy, config, attrib_list);
-}
-
-EGLSurface eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config,
- EGLNativePixmapType pixmap,
- const EGLint *attrib_list)
-{
- EGL_DLSYM(&_eglCreatePixmapSurface, "eglCreatePixmapSurface");
- return (*_eglCreatePixmapSurface)(dpy, config, pixmap, attrib_list);
-}
+HYBRIS_IMPLEMENT_FUNCTION3(egl, EGLSurface, eglCreatePbufferSurface, EGLDisplay, EGLConfig, const EGLint *);
+HYBRIS_IMPLEMENT_FUNCTION4(egl, EGLSurface, eglCreatePixmapSurface, EGLDisplay, EGLConfig, EGLNativePixmapType, const EGLint *);
EGLBoolean eglDestroySurface(EGLDisplay dpy, EGLSurface surface)
{
- EGL_DLSYM(&_eglDestroySurface, "eglDestroySurface");
+ HYBRIS_DLSYSM(egl, &_eglDestroySurface, "eglDestroySurface");
EGLBoolean result = (*_eglDestroySurface)(dpy, surface);
/**
@@ -304,64 +270,15 @@
return result;
}
-EGLBoolean eglQuerySurface(EGLDisplay dpy, EGLSurface surface,
- EGLint attribute, EGLint *value)
-{
- EGL_DLSYM(&_eglQuerySurface, "eglQuerySurface");
- return (*_eglQuerySurface)(dpy, surface, attribute, value);
-}
-
-
-EGLBoolean eglBindAPI(EGLenum api)
-{
- EGL_DLSYM(&_eglBindAPI, "eglBindAPI");
- return (*_eglBindAPI)(api);
-}
-
-EGLenum eglQueryAPI(void)
-{
- EGL_DLSYM(&_eglQueryAPI, "eglQueryAPI");
- return (*_eglQueryAPI)();
-}
-
-EGLBoolean eglWaitClient(void)
-{
- EGL_DLSYM(&_eglWaitClient, "eglWaitClient");
- return (*_eglWaitClient)();
-}
-
-EGLBoolean eglReleaseThread(void)
-{
- EGL_DLSYM(&_eglReleaseThread, "eglReleaseThread");
- return (*_eglReleaseThread)();
-}
-
-EGLSurface eglCreatePbufferFromClientBuffer(
- EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer,
- EGLConfig config, const EGLint *attrib_list)
-{
- EGL_DLSYM(&_eglCreatePbufferFromClientBuffer, "eglCreatePbufferFromClientBuffer");
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.17.1.tar.bz2/libhybris/hybris/egl/platforms/null/eglplatform_null.c
^
|
@@ -7,26 +7,14 @@
#include <eglplatformcommon.h>
#include "logging.h"
-static void * (*_androidCreateDisplaySurface)();
-
-static void *_libui = NULL;
-
static gralloc_module_t *gralloc = 0;
static alloc_device_t *alloc = 0;
-static void _init_androidui()
-{
- _libui = (void *) android_dlopen("/system/lib/libui.so", RTLD_LAZY);
-}
-
-#define UI_DLSYM(fptr, sym) do { if (_libui == NULL) { _init_androidui(); }; if (*(fptr) == NULL) { *(fptr) = (void *) android_dlsym(_libui, sym); } } while (0)
-
-static EGLNativeWindowType android_createDisplaySurface()
-{
- UI_DLSYM(&_androidCreateDisplaySurface, "android_createDisplaySurface");
- return (EGLNativeWindowType) (*_androidCreateDisplaySurface)();
-}
+#pragma GCC visibility push(hidden)
+HYBRIS_LIBRARY_INITIALIZE(nullui, "/system/lib/libui.so");
+#pragma GCC visibility pop
+static HYBRIS_IMPLEMENT_FUNCTION0(nullui, EGLNativeWindowType, android_createDisplaySurface);
static void nullws_init_module(struct ws_egl_interface *egl_iface)
{
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.17.1.tar.bz2/libhybris/hybris/glesv2/glesv2.c
^
|
@@ -299,6 +299,7 @@
GLES2_LOAD(glIsTexture);
GLES2_LOAD(glLinkProgram);
GLES2_LOAD(glPixelStorei);
+ GLES2_LOAD(glReadPixels);
GLES2_LOAD(glReleaseShaderCompiler);
GLES2_LOAD(glRenderbufferStorage);
GLES2_LOAD(glScissor);
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.17.1.tar.bz2/libhybris/hybris/hardware/hardware.c
^
|
@@ -15,36 +15,16 @@
*
*/
-#include <android-config.h>
#include <dlfcn.h>
#include <stddef.h>
#include <hardware/hardware.h>
#include <hybris/common/binding.h>
-static void *_libhardware = NULL;
+#pragma GCC visibility push(hidden)
+HYBRIS_LIBRARY_INITIALIZE(hardware, "/system/lib/libhardware.so");
+#pragma GCC visibility pop
-static int (*_hw_get_module)(const char *id, const struct hw_module_t **module) = NULL;
-
-static int (*_hw_get_module_by_class)(const char *class_id, const char *inst, const struct hw_module_t **module) = NULL;
-
-#define HARDWARE_DLSYM(fptr, sym) do { if (_libhardware == NULL) { _init_lib_hardware(); }; if (*(fptr) == NULL) { *(fptr) = (void *) android_dlsym(_libhardware, sym); } } while (0)
-
-static void _init_lib_hardware()
-{
- _libhardware = (void *) android_dlopen("libhardware.so", RTLD_LAZY);
-}
-
-int hw_get_module(const char *id, const struct hw_module_t **module)
-{
- HARDWARE_DLSYM(&_hw_get_module, "hw_get_module");
- return (*_hw_get_module)(id, module);
-}
-
-int hw_get_module_by_class(const char *class_id, const char *inst,
- const struct hw_module_t **module)
-{
- HARDWARE_DLSYM(&_hw_get_module_by_class, "hw_get_module_by_class");
- return (*_hw_get_module_by_class)(class_id, inst, module);
-}
+HYBRIS_IMPLEMENT_FUNCTION2(hardware, int, hw_get_module, const char *, const struct hw_module_t **);
+HYBRIS_IMPLEMENT_FUNCTION3(hardware, int, hw_get_module_by_class, const char *, const char *, const struct hw_module_t **);
// vim:ts=4:sw=4:noexpandtab
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.17.1.tar.bz2/libhybris/hybris/properties/properties.c
^
|
@@ -151,7 +151,7 @@
/* In case it's null, just use the default */
if ((strlen(msg.value) == 0) && (default_value)) {
- if (strlen(default_value) >= PROP_VALUE_MAX -1) return -1;
+ if (strlen(default_value) > PROP_VALUE_MAX -1) return -1;
strcpy(msg.value, default_value);
}
@@ -164,7 +164,7 @@
{
char *ret = NULL;
- if ((key) && (strlen(key) >= PROP_NAME_MAX -1)) return -1;
+ if ((key) && (strlen(key) > PROP_NAME_MAX -1)) return -1;
if (value == NULL) return -1;
@@ -208,8 +208,8 @@
if (key == 0) return -1;
if (value == 0) value = "";
- if (strlen(key) >= PROP_NAME_MAX -1) return -1;
- if (strlen(value) >= PROP_VALUE_MAX -1) return -1;
+ if (strlen(key) > PROP_NAME_MAX -1) return -1;
+ if (strlen(value) > PROP_VALUE_MAX -1) return -1;
runtime_cache_lock();
runtime_cache_remove(key);
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.17.1.tar.bz2/libhybris/hybris/tests/test_hwcomposer.cpp
^
|
@@ -119,7 +119,7 @@
assert(err == 0);
err = hwcdevice->set(hwcdevice, HWC_NUM_DISPLAY_TYPES, mlist);
- assert(err == 0);
+ // in android surfaceflinger ignores the return value as not all display types may be supported
setFenceBufferFd(buffer, fblayer->releaseFenceFd);
if (oldretire != -1)
@@ -150,6 +150,13 @@
EGLBoolean rv;
int err;
+
+ hw_module_t const* module = NULL;
+ err = hw_get_module(GRALLOC_HARDWARE_MODULE_ID, &module);
+ assert(err == 0);
+ framebuffer_device_t* fbDev = NULL;
+ framebuffer_open(module, &fbDev);
+
hw_module_t *hwcModule = 0;
hwc_composer_device_1_t *hwcDevicePtr = 0;
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.17.1.tar.bz2/libhybris/hybris/vibrator/vibrator.c
^
|
@@ -18,7 +18,6 @@
#include <dlfcn.h>
#include <stddef.h>
-#include <stdbool.h>
#include <hybris/common/binding.h>
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.17.1.tar.bz2/upstream/hybris/egl/egl.c
^
|
@@ -38,8 +38,8 @@
#include <system/window.h>
#include "logging.h"
-static void *_libegl = NULL;
-static void *_libgles = NULL;
+static void *egl_handle = NULL;
+static void *glesv2_handle = NULL;
static void *_hybris_libgles1 = NULL;
static void *_hybris_libgles2 = NULL;
static int _egl_context_client_version = 1;
@@ -121,16 +121,26 @@
static void _init_androidegl()
{
- _libegl = (void *) android_dlopen(getenv("LIBEGL") ? getenv("LIBEGL") : "libEGL.so", RTLD_LAZY);
- _libgles = (void *) android_dlopen(getenv("LIBGLESV2") ? getenv("LIBGLESV2") : "libGLESv2.so", RTLD_LAZY);
+ egl_handle = (void *) android_dlopen(getenv("LIBEGL") ? getenv("LIBEGL") : "libEGL.so", RTLD_LAZY);
+ glesv2_handle = (void *) android_dlopen(getenv("LIBGLESV2") ? getenv("LIBGLESV2") : "libGLESv2.so", RTLD_LAZY);
+}
+
+static inline void hybris_egl_initialize()
+{
+ _init_androidegl();
+}
+
+static inline void hybris_glesv2_initialize()
+{
+ _init_androidegl();
}
static void * _android_egl_dlsym(const char *symbol)
{
- if (_libegl == NULL)
+ if (egl_handle == NULL)
_init_androidegl();
- return android_dlsym(_libegl, symbol);
+ return android_dlsym(egl_handle, symbol);
}
struct ws_egl_interface hybris_egl_interface = {
@@ -139,14 +149,7 @@
egl_helper_get_mapping,
};
-#define EGL_DLSYM(fptr, sym) do { if (_libegl == NULL) { _init_androidegl(); }; if (*(fptr) == NULL) { *(fptr) = (void *) android_dlsym(_libegl, sym); } } while (0)
-#define GLESv2_DLSYM(fptr, sym) do { if (_libgles == NULL) { _init_androidegl(); }; if (*(fptr) == NULL) { *(fptr) = (void *) android_dlsym(_libgles, sym); } } while (0)
-
-EGLint eglGetError(void)
-{
- EGL_DLSYM(&_eglGetError, "eglGetError");
- return (*_eglGetError)();
-}
+HYBRIS_IMPLEMENT_FUNCTION0(egl, EGLint, eglGetError);
#define _EGL_MAX_DISPLAYS 100
@@ -184,7 +187,7 @@
EGLDisplay eglGetDisplay(EGLNativeDisplayType display_id)
{
- EGL_DLSYM(&_eglGetDisplay, "eglGetDisplay");
+ HYBRIS_DLSYSM(egl, &_eglGetDisplay, "eglGetDisplay");
EGLNativeDisplayType real_display;
real_display = (*_eglGetDisplay)(EGL_DEFAULT_DISPLAY);
@@ -206,15 +209,11 @@
return real_display;
}
-EGLBoolean eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor)
-{
- EGL_DLSYM(&_eglInitialize, "eglInitialize");
- return (*_eglInitialize)(dpy, major, minor);
-}
+HYBRIS_IMPLEMENT_FUNCTION3(egl, EGLBoolean, eglInitialize, EGLDisplay, EGLint *, EGLint *);
EGLBoolean eglTerminate(EGLDisplay dpy)
{
- EGL_DLSYM(&_eglTerminate, "eglTerminate");
+ HYBRIS_DLSYSM(egl, &_eglTerminate, "eglTerminate");
struct _EGLDisplay *display = hybris_egl_display_get_mapping(dpy);
ws_Terminate(display);
@@ -223,40 +222,19 @@
const char * eglQueryString(EGLDisplay dpy, EGLint name)
{
- EGL_DLSYM(&_eglQueryString, "eglQueryString");
+ HYBRIS_DLSYSM(egl, &_eglQueryString, "eglQueryString");
return ws_eglQueryString(dpy, name, _eglQueryString);
}
-EGLBoolean eglGetConfigs(EGLDisplay dpy, EGLConfig *configs,
- EGLint config_size, EGLint *num_config)
-{
- EGL_DLSYM(&_eglGetConfigs, "eglGetConfigs");
- return (*_eglGetConfigs)(dpy, configs, config_size, num_config);
-}
-
-EGLBoolean eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list,
- EGLConfig *configs, EGLint config_size,
- EGLint *num_config)
-{
- EGL_DLSYM(&_eglChooseConfig, "eglChooseConfig");
- return (*_eglChooseConfig)(dpy, attrib_list,
- configs, config_size,
- num_config);
-}
-
-EGLBoolean eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config,
- EGLint attribute, EGLint *value)
-{
- EGL_DLSYM(&_eglGetConfigAttrib, "eglGetConfigAttrib");
- return (*_eglGetConfigAttrib)(dpy, config,
- attribute, value);
-}
+HYBRIS_IMPLEMENT_FUNCTION4(egl, EGLBoolean, eglGetConfigs, EGLDisplay, EGLConfig *, EGLint, EGLint *);
+HYBRIS_IMPLEMENT_FUNCTION5(egl, EGLBoolean, eglChooseConfig, EGLDisplay, const EGLint *, EGLConfig *, EGLint, EGLint *);
+HYBRIS_IMPLEMENT_FUNCTION4(egl, EGLBoolean, eglGetConfigAttrib, EGLDisplay, EGLConfig, EGLint, EGLint *);
EGLSurface eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config,
EGLNativeWindowType win,
const EGLint *attrib_list)
{
- EGL_DLSYM(&_eglCreateWindowSurface, "eglCreateWindowSurface");
+ HYBRIS_DLSYSM(egl, &_eglCreateWindowSurface, "eglCreateWindowSurface");
HYBRIS_TRACE_BEGIN("hybris-egl", "eglCreateWindowSurface", "");
struct _EGLDisplay *display = hybris_egl_display_get_mapping(dpy);
@@ -273,24 +251,12 @@
return result;
}
-EGLSurface eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config,
- const EGLint *attrib_list)
-{
- EGL_DLSYM(&_eglCreatePbufferSurface, "eglCreatePbufferSurface");
- return (*_eglCreatePbufferSurface)(dpy, config, attrib_list);
-}
-
-EGLSurface eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config,
- EGLNativePixmapType pixmap,
- const EGLint *attrib_list)
-{
- EGL_DLSYM(&_eglCreatePixmapSurface, "eglCreatePixmapSurface");
- return (*_eglCreatePixmapSurface)(dpy, config, pixmap, attrib_list);
-}
+HYBRIS_IMPLEMENT_FUNCTION3(egl, EGLSurface, eglCreatePbufferSurface, EGLDisplay, EGLConfig, const EGLint *);
+HYBRIS_IMPLEMENT_FUNCTION4(egl, EGLSurface, eglCreatePixmapSurface, EGLDisplay, EGLConfig, EGLNativePixmapType, const EGLint *);
EGLBoolean eglDestroySurface(EGLDisplay dpy, EGLSurface surface)
{
- EGL_DLSYM(&_eglDestroySurface, "eglDestroySurface");
+ HYBRIS_DLSYSM(egl, &_eglDestroySurface, "eglDestroySurface");
EGLBoolean result = (*_eglDestroySurface)(dpy, surface);
/**
@@ -304,64 +270,15 @@
return result;
}
-EGLBoolean eglQuerySurface(EGLDisplay dpy, EGLSurface surface,
- EGLint attribute, EGLint *value)
-{
- EGL_DLSYM(&_eglQuerySurface, "eglQuerySurface");
- return (*_eglQuerySurface)(dpy, surface, attribute, value);
-}
-
-
-EGLBoolean eglBindAPI(EGLenum api)
-{
- EGL_DLSYM(&_eglBindAPI, "eglBindAPI");
- return (*_eglBindAPI)(api);
-}
-
-EGLenum eglQueryAPI(void)
-{
- EGL_DLSYM(&_eglQueryAPI, "eglQueryAPI");
- return (*_eglQueryAPI)();
-}
-
-EGLBoolean eglWaitClient(void)
-{
- EGL_DLSYM(&_eglWaitClient, "eglWaitClient");
- return (*_eglWaitClient)();
-}
-
-EGLBoolean eglReleaseThread(void)
-{
- EGL_DLSYM(&_eglReleaseThread, "eglReleaseThread");
- return (*_eglReleaseThread)();
-}
-
-EGLSurface eglCreatePbufferFromClientBuffer(
- EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer,
- EGLConfig config, const EGLint *attrib_list)
-{
- EGL_DLSYM(&_eglCreatePbufferFromClientBuffer, "eglCreatePbufferFromClientBuffer");
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.17.1.tar.bz2/upstream/hybris/egl/platforms/null/eglplatform_null.c
^
|
@@ -7,26 +7,14 @@
#include <eglplatformcommon.h>
#include "logging.h"
-static void * (*_androidCreateDisplaySurface)();
-
-static void *_libui = NULL;
-
static gralloc_module_t *gralloc = 0;
static alloc_device_t *alloc = 0;
-static void _init_androidui()
-{
- _libui = (void *) android_dlopen("/system/lib/libui.so", RTLD_LAZY);
-}
-
-#define UI_DLSYM(fptr, sym) do { if (_libui == NULL) { _init_androidui(); }; if (*(fptr) == NULL) { *(fptr) = (void *) android_dlsym(_libui, sym); } } while (0)
-
-static EGLNativeWindowType android_createDisplaySurface()
-{
- UI_DLSYM(&_androidCreateDisplaySurface, "android_createDisplaySurface");
- return (EGLNativeWindowType) (*_androidCreateDisplaySurface)();
-}
+#pragma GCC visibility push(hidden)
+HYBRIS_LIBRARY_INITIALIZE(nullui, "/system/lib/libui.so");
+#pragma GCC visibility pop
+static HYBRIS_IMPLEMENT_FUNCTION0(nullui, EGLNativeWindowType, android_createDisplaySurface);
static void nullws_init_module(struct ws_egl_interface *egl_iface)
{
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.17.1.tar.bz2/upstream/hybris/glesv2/glesv2.c
^
|
@@ -299,6 +299,7 @@
GLES2_LOAD(glIsTexture);
GLES2_LOAD(glLinkProgram);
GLES2_LOAD(glPixelStorei);
+ GLES2_LOAD(glReadPixels);
GLES2_LOAD(glReleaseShaderCompiler);
GLES2_LOAD(glRenderbufferStorage);
GLES2_LOAD(glScissor);
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.17.1.tar.bz2/upstream/hybris/hardware/hardware.c
^
|
@@ -15,36 +15,16 @@
*
*/
-#include <android-config.h>
#include <dlfcn.h>
#include <stddef.h>
#include <hardware/hardware.h>
#include <hybris/common/binding.h>
-static void *_libhardware = NULL;
+#pragma GCC visibility push(hidden)
+HYBRIS_LIBRARY_INITIALIZE(hardware, "/system/lib/libhardware.so");
+#pragma GCC visibility pop
-static int (*_hw_get_module)(const char *id, const struct hw_module_t **module) = NULL;
-
-static int (*_hw_get_module_by_class)(const char *class_id, const char *inst, const struct hw_module_t **module) = NULL;
-
-#define HARDWARE_DLSYM(fptr, sym) do { if (_libhardware == NULL) { _init_lib_hardware(); }; if (*(fptr) == NULL) { *(fptr) = (void *) android_dlsym(_libhardware, sym); } } while (0)
-
-static void _init_lib_hardware()
-{
- _libhardware = (void *) android_dlopen("libhardware.so", RTLD_LAZY);
-}
-
-int hw_get_module(const char *id, const struct hw_module_t **module)
-{
- HARDWARE_DLSYM(&_hw_get_module, "hw_get_module");
- return (*_hw_get_module)(id, module);
-}
-
-int hw_get_module_by_class(const char *class_id, const char *inst,
- const struct hw_module_t **module)
-{
- HARDWARE_DLSYM(&_hw_get_module_by_class, "hw_get_module_by_class");
- return (*_hw_get_module_by_class)(class_id, inst, module);
-}
+HYBRIS_IMPLEMENT_FUNCTION2(hardware, int, hw_get_module, const char *, const struct hw_module_t **);
+HYBRIS_IMPLEMENT_FUNCTION3(hardware, int, hw_get_module_by_class, const char *, const char *, const struct hw_module_t **);
// vim:ts=4:sw=4:noexpandtab
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.17.1.tar.bz2/upstream/hybris/properties/properties.c
^
|
@@ -151,7 +151,7 @@
/* In case it's null, just use the default */
if ((strlen(msg.value) == 0) && (default_value)) {
- if (strlen(default_value) >= PROP_VALUE_MAX -1) return -1;
+ if (strlen(default_value) > PROP_VALUE_MAX -1) return -1;
strcpy(msg.value, default_value);
}
@@ -164,7 +164,7 @@
{
char *ret = NULL;
- if ((key) && (strlen(key) >= PROP_NAME_MAX -1)) return -1;
+ if ((key) && (strlen(key) > PROP_NAME_MAX -1)) return -1;
if (value == NULL) return -1;
@@ -208,8 +208,8 @@
if (key == 0) return -1;
if (value == 0) value = "";
- if (strlen(key) >= PROP_NAME_MAX -1) return -1;
- if (strlen(value) >= PROP_VALUE_MAX -1) return -1;
+ if (strlen(key) > PROP_NAME_MAX -1) return -1;
+ if (strlen(value) > PROP_VALUE_MAX -1) return -1;
runtime_cache_lock();
runtime_cache_remove(key);
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.17.1.tar.bz2/upstream/hybris/tests/test_hwcomposer.cpp
^
|
@@ -119,7 +119,7 @@
assert(err == 0);
err = hwcdevice->set(hwcdevice, HWC_NUM_DISPLAY_TYPES, mlist);
- assert(err == 0);
+ // in android surfaceflinger ignores the return value as not all display types may be supported
setFenceBufferFd(buffer, fblayer->releaseFenceFd);
if (oldretire != -1)
@@ -150,6 +150,13 @@
EGLBoolean rv;
int err;
+
+ hw_module_t const* module = NULL;
+ err = hw_get_module(GRALLOC_HARDWARE_MODULE_ID, &module);
+ assert(err == 0);
+ framebuffer_device_t* fbDev = NULL;
+ framebuffer_open(module, &fbDev);
+
hw_module_t *hwcModule = 0;
hwc_composer_device_1_t *hwcDevicePtr = 0;
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.17.1.tar.bz2/upstream/hybris/vibrator/vibrator.c
^
|
@@ -18,7 +18,6 @@
#include <dlfcn.h>
#include <stddef.h>
-#include <stdbool.h>
#include <hybris/common/binding.h>
|