Prevent IPCThreadState::joinThreadPool from spinning on unexpected error

Adds logging to help determine what is happening to the /dev/binder
fd and dump the process state when it happens.

bug: 8912673
Change-Id: I2aa0c66fc499e91e0bf9ee4ae20404bec35adc82
merge in jb-mr2-zeroday-release history after reset to jb-mr2-dev
Find non-extension GLES wrappers in eglGetProcAddress

This allows apps to find OpenGL ES 3.0 functions using
eglGetProcAddress() instead of dlopen/dlsym.

Bug: 9681677
Change-Id: I7ce6e1636bc47d6b0bf20a4e46bd67235714d129
merge in jb-mr2-zeroday-release history after reset to jb-mr2-dev
fix a dead-lock in sensorservice

sensorservice would deadlock if for some reason
a sensor failed to enable.

simplifed the code a bit, and made it behave a little
closer to mr1.1 -- I couldn't convince myself that
some changes in how locks were used were correct.

Bug: 9794362
Change-Id: I6110f5dbb67e543f1c71d127de2299232badb36a
merge in jb-mr2-zeroday-release history after reset to jb-mr2-dev
Forward-port surface dithering from CM10.1

This allows the use of 16-bit color displays without excessive color
banding;

Change-Id: Icb469b9cb4beb686516c60bb576dbd0a73f505e0
Revert "Simplify OpenGL TLS access on ARM."

This reverts commit 288870ebc3da8121b7a237a53280bd8b931b7a2f.

Conflicts:

	opengl/libagl/Android.mk
	opengl/libs/EGL/getProcAddress.cpp
	opengl/libs/GLES2/gl2.cpp
	opengl/libs/GLES_CM/gl.cpp

Change-Id: I1401ab19e3035c1ed132781f126aafc5149d66ae
Prefer 16bpp surface formats

Adds a property to use RGB565 surface formats for the opaque
surface default, enabled by default.

Change-Id: Iac9bbc8292a863e2ab86093df3ecf218e4ec61e1

Conflicts:
	services/surfaceflinger/SurfaceFlinger.cpp
don't use fence sync for qcom legacy display

Change-Id: I4e7df9ac5c6e2eb5e6f923c907d0ec8d391a93d8
separate mHeap-based screenshot from BOARD_EGL_NEEDS_LEGACY_FB

No need for the Exynos/Tegra legacy fb implementation on legacy
qcom. Add a separate flag for mHeap-based screenshot in case of
future extensions. Enable mHeap-based screenshot for legacy qcom
dislay.

Change-Id: I35ff015555f19a5ba2857ad3d765d02eb6b9acde
Add overlay support for camera

Change-Id: I4089f2ba9d4a23af6ce53e9d1ece08260511502d
Select texture target based on pixel format

Adreno is not optimized for GL_TEXTURE_EXTERNAL_OES, making GPU
utilization (and power), high with GL_TEXTURE_EXTERNAL_OES for
RGB formats.

Change texture target from GL_EXTERNAL_TEXTURE_OES to dynamically
select between GL_EXTERNAL_TEXTURE_OES, and GL_TEXTURE_2D based
on the pixel format.

CM9 original author: Neti Ravi Kumar
CM9-Change-Id: I89ab1d60b23eef55442a9fd338b2a05b3304ce61

Change-Id: I9ea82f3fd1d9caea22d4b1da843f2dedb2daf51b

Signed-off-by: Daz Jones <yuki@thebronasium.com>
surfaceflinger: enable EGL_NEEDS_FNW for qcom legacy

Signed-off-by: Michael Bestas <mikeioannina@gmail.com>

Change-Id: Ia6df94e8380062d646e29f293e5dc768e8a138e7
Merge tag 'android-4.3_r2.2' of https://android.googlesource.com/platform/frameworks/native into cm-10.2

Android 4.3 release 2.2

Change-Id: If9463fdc227b5fc97450a3ba94da815af6d9e657
Merge remote-tracking branch 'cm/cm-10.2' into cm-10.2
Merge branch 'cm-10.2' of https://github.com/androidarmv6/android_frameworks_native into cm-10.2

Conflicts:
	services/surfaceflinger/Layer.cpp
	services/surfaceflinger/SurfaceFlinger.cpp
	services/surfaceflinger/SurfaceFlinger.h