option to prefer 16bpp surface formats

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

Change-Id: Iac9bbc8292a863e2ab86093df3ecf218e4ec61e1

Conflicts:
	services/surfaceflinger/SurfaceFlinger.cpp
	services/surfaceflinger/SurfaceFlinger.h
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

Conflicts:
	include/gui/ISurfaceComposer.h
	include/gui/SurfaceComposerClient.h
	libs/gui/Android.mk
	libs/gui/ISurfaceComposer.cpp
	libs/gui/SurfaceComposerClient.cpp
	services/surfaceflinger/Android.mk
	services/surfaceflinger/SurfaceFlinger.cpp
	services/surfaceflinger/SurfaceFlinger.h
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

Change-Id: I89ab1d60b23eef55442a9fd338b2a05b3304ce61

Conflicts:
	include/gui/GLConsumer.h
	services/surfaceflinger/Android.mk
	services/surfaceflinger/Layer.cpp
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/EGL/getProcAddress.cpp
	opengl/libs/GLES2/gl2.cpp
fix build on non-QCOM_BSP

This reverts commit 7f3d20238aa25d6c87152b1d7c8854294df8d572
for non-QCOM_BSP.

Change-Id: I77ddb47641a3689b276df39143617a8ca86265d1

Conflicts:
	libs/gui/Surface.cpp