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

Conflicts:

	opengl/libs/Android.mk

Conflicts:
	opengl/libs/Android.mk
Add overlay support for camera

Change-Id: I4089f2ba9d4a23af6ce53e9d1ece08260511502d
binder: add compat getCallingUidEv symbol

Fixes lg ril :
E/RILD    (27586): dlopen failed: dlopen failed: could not load library "liblgdrm.so" needed by
 "libril-qc-1.so"; caused by cannot locate symbol "_ZN7android14IPCThreadState13getCallingUidEv"
  referenced by "liblgdrm.so"...

Change-Id: I1e27583ec4b08147d31cb1976ea49336e451e0b6
MemoryHeapBase: ifdef for gingerbread/froyo compatibility

This change is required to use overlay based proprietary camera libs
coming from gingerbread and froyo builds.

This change also requires a global cflag named BINDER_COMPAT
because a lot of modules use the MemoryHeap includes

Add this in your BoardConfig.mk :
COMMON_GLOBAL_CFLAGS += -DBINDER_COMPAT

Backported from /#/c/13317/

Change-Id: I919a2a89d5efa0eab5ef286979fcd823b62a363c
(cherry picked from commit 5ed802ec57a87d78008b13fc094fdb99ddc5206b)
msm7x27: Disable fence sync

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

Change-Id: Ifecc7af579bfde9d0a7daaaf528ea0773ce6ceb2

Conflicts:
	libs/gui/Android.mk
DisplayDevice: Backwards compatibility with old EGL

From 4.1 to 4.2, the display subsystem was reworked to
use SurfaceTextureClient/BufferQueue instead of
FramebufferNativeWindow for the framebuffer itself.

Unfortunately, some legacy EGL libraries make assumptions
that any framebuffer device will be FramebufferNativeWindow.

These EGL libraries will fail when used in 4.2 as if the
framebuffer is not FramebufferNativeWindow, they will
try to dequeue more than one buffer at a time, which
will cause a hang of the graphics subsystem.

This allows use of FramebufferNativeWindow to keep
legacy EGL implementations happy.  Confirmed EGL
implementations that need this include but are
not limited to:

Set BOARD_EGL_NEEDS_FNW to use

Tegra2/3 ICS EGL
Mali400 ICS EGL (Allwinner A10)
Mali400 Jellybean (4.1) EGL (Samsung Exynos4)
Adreno Jellybean (4.1) EGL (legacy qcom devices using PMEM)

Original implementation by OndraOrg of XDA:
http://forum.xda-developers.com/showpost.php?p=34469675&postcount=19

Change-Id: If7c455035a002f272fa1a8af1cfcc60eb7ade894

Conflicts:
	services/surfaceflinger/Android.mk
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.

This change is done to reduce the composition time for 8x55

Conflicts:
        libs/gui/Android.mk

Change-Id: I89ab1d60b23eef55442a9fd338b2a05b3304ce61