Set the attached size of wl_egl_windows.

Make wl_egl_window_get_attached_size() give the right values instead
of always 0,0.
Merge pull request #189 from giucam/wl_egl_fix

Set the attached size of wl_egl_windows.
New optimization via gnu dispatching
Removed debug include and added comment
make with-android-headers optional

If --with-android-headers is not specified, try to use pkg-config.

Also, extract Android versions from android-version.h using
ANDROID_HEADERS_CFLAGS and the preprocessor.

Signed-off-by: Adrian Negreanu <adrian.m.negreanu@intel.com>
Don't use the android/ prefix in #includes
Ensure all Makefile.am have ANDROID_HEADERS_CFLAGS to avoid the android/ prefix in #include

[adrian] use ANDROID_HEADERS_CFLAGS instead of '-Itop_srcdir/include/android -Itop_srcdir/include/android/libnfc-nxp'

Signed-off-by: David Greaves <david@dgreaves.com>
Signed-off-by: Adrian Negreanu <adrian.m.negreanu@intel.com>
remove unused gralloc param

Signed-off-by: Adrian Negreanu <adrian.m.negreanu@intel.com>
remove un-defined egl_create_image_wl

Signed-off-by: Adrian Negreanu <adrian.m.negreanu@intel.com>
extract bionic kernel headers

This patch correctly extracts bionic kernel headers instead
of those under external/kernel-headers/original/.

From external/kernel-headers/original/README.txt:
  This directory contains the original kernel headers that are used to generate Bionic's "cleaned-up" user-land headers.
  They are mostly covered by the GPLv2 + exception, and thus cannot be distributed as part of the platform itself.
  (NOTE: The cleaned up headers do not contain copyrightable information and are distributed with Bionic)
Merge pull request #195 from groleo/cleanups

Cleanups
Merge pull request #197 from groleo/alterego-use-kernel-headers-from-bionic

extract bionic kernel headers
add vimline with style

Signed-off-by: Adrian Negreanu <adrian.m.negreanu@intel.com>
more detailed usage message

Signed-off-by: Adrian Negreanu <adrian.m.negreanu@intel.com>
rpm complains when headers have executable bit set

Signed-off-by: Adrian Negreanu <adrian.m.negreanu@intel.com>
add makefile for android headers

Signed-off-by: Adrian Negreanu <adrian.m.negreanu@intel.com>
no need for check_header_exists

Signed-off-by: Adrian Negreanu <adrian.m.negreanu@intel.com>
dynamically add hooks from glibc

The hook table contains
a. functions that need parameter conversion
   (like parameters of type FILE*, or pthread_mutex_t*)
b. some of the pthread_ functions we know to work from glibc.
   The pthread functions that we don't have in the hook table,
   when called by client code, will cause a crash.

If a symbol is not found in the hook table, it's searched
in libc.so.6. If it's not found there, then we fallback to bionic.

So far, this patch covers bionic{libc,libdl} and a part of libthread_db.
Still to be covered is libm, libstdc++ and linker.

For debugging purposes, one can use HYBRIS_FROM_BIONIC to
force a symbol to be used from Bionic.

So far, I only need longjmp and setjmp from bionic{libc}, everything else
being called from (e)glibc.

Tested on nexus 4 as:
  HYBRIS_EGLPLATFORM=hwcomposer \
  ./ARMHF/bin/test_hwcomposer

Signed-off-by: Adrian Negreanu <adrian.m.negreanu@intel.com>
egl: Add a module_init function for loading modules and pass EGL functions into the platform modules
egl:wayland: Send a wl_display.sync event after wl_surface.commit in queueBuffer

Some compositors, namely weston, queue buffer release events and wait until
something like a frame event to flush them out.  Without a frame event, you
need to send a wl_display.sync event to ensure that the resulting
wl_buffer.release actually gets sent.  Without this, you may get starved
for buffers.