egl: fbdev: Allow multiple eglGetDisplay() calls

We don't support multiple windows but if the previous window has been
dealt with there is no reason why starting from scratch with eglGetDisplay()
would not work.

Signed-off-by: Kalle Vahlman <kalle.vahlman@movial.com>
tests: test_egl should destroy the EglImageKHR it creates

test_egl creates an EglImageKHR but never destroys it so the EGL
drivers might be holding on to the native buffer even after test_egl
releases it.

Signed-off-by: Kalle Vahlman <kalle.vahlman@movial.com>
Merge pull request #147 from kvahlman/fdev-multidisplay

egl: fbdev: Allow multiple eglGetDisplay() calls
Merge pull request #148 from kvahlman/cleanup-in-test_egl

tests: test_egl should destroy the EglImageKHR it creates
egl: wayland: Add missing dashes to TRACE output

Some TRACE_* calls seem to miss the dash that separates printed
modules from values.

Signed-off-by: Kalle Vahlman <kalle.vahlman@movial.com>
egl: wayland: Implement WaylandNativeWindow::cancelBuffer()

Pretty much a question of doing the same dance as in releaseBuffer() as we
expect dequeue/cancel cycle to mean the buffer was not used for rendering
after all.

The usual case seems to be drivers dequeuing in advance and then cancelling
when eg. the window gets made uncurrent and/or destroyed, though missing
cancelBuffer() opens up possible scenarios where the buffers get stuck as
busy. There are some reports of getting stuck waiting for free buffers, but
no steps to reproduce so it remains an open question if this happens in the
wild or not.

Signed-off-by: Kalle Vahlman <kalle.vahlman@movial.com>
Merge pull request #152 from kvahlman/wayland-cancel

egl: wayland: Implement WaylandNativeWindow::cancelBuffer()
Merge pull request #151 from kvahlman/missing-dashes

egl: wayland: Add missing dashes to TRACE output
extract-headers.sh: Detect platform version from version_defaults.mk

Now extract-headers.sh only needs the source and destination paths,
the version can be determined automatically from AOSP/CM sources.

Signed-off-by: Thomas Perl <thomas.perl@jolla.com>
libnfc_nxp: Add support for building against Android 4.3 headers

Signed-off-by: Thomas Perl <thomas.perl@jolla.com>
Merge pull request #154 from thp/autodetect-header-version

extract-headers.sh: Detect platform version from version_defaults.mk
Merge pull request #155 from thp/nfc-4.3

libnfc_nxp: Add support for building against Android 4.3 headers
wayland_window: Fix removed enum in Android 4.3

The NATIVE_WINDOW_SURFACE_TEXTURE_CLIENT value has been removed in
Android 4.3. Work around it by using NATIVE_WINDOW_SURFACE instead.
egl: wayland: Fix overzealous dashing

Dashes are sometimes called minus signs so adding dashes to TRACE_COUNTER
calls would make the counted values negative. Whoops.

Signed-off-by: Kalle Vahlman <kalle.vahlman@movial.com>
Merge pull request #150 from rburchell/master

Cache properties in a memory-backed store to make lookups more efficient.
egl: wayland: Don't leak wayland buffers on buffer reallocation

We destroy the wayland buffers when killing of the window, but did not
when buffers are re-allocated on the fly.

Signed-off-by: Kalle Vahlman <kalle.vahlman@movial.com>
egl: wayland: Clean up wayland related resources in ~WaylandNativeWindow()

We have a handful of wayland resources that need to be released when
the window is disposed of.

Signed-off-by: Kalle Vahlman <kalle.vahlman@movial.com>
Merge pull request #159 from kvahlman/wayland-leaks

Wayland leaks
Merge pull request #157 from kvahlman/large-rock-dash

egl: wayland: Fix overzealous dashing
Merge pull request #156 from thp/nativewindowsurface-4.3

wayland_window: Fix removed enum in Android 4.3