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
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
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
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
Reset the FrameNumber for dropped frame in async mode

In Async, reset the framenumber of frames dropped by the BufferQueue.
This allows the client to dequeue and use this frame before the other
queued frames which may be with the MDP.

CRs-fixed: 448606

Change-Id: Icaabf77b55a7275dc98ba1fdfba89508feb92145
Check fence is not NULL before dereferencing it

If the fence obtained in dequeueBuffer is NULL, don't dereference it.
This will avoid a crash in surfaceflinger.

CRs-fixed: 516300
Change-Id: I3054dc37087103f3addae7884bb03460484a1eec
Surface: Initialize variable and add a defensive check.

Initialize buf variable and make sure to check for return
value of dequeueBuffer() before sending to the client.

Change-Id: I0569f2d45825fab0e5d0f38fc91a07990f57c7ab
Merge "Check fence is not NULL before dereferencing it" into cm-10.2
Merge "Surface: Initialize variable and add a defensive check." into cm-10.2
Merge remote-tracking branch 'CyanogenMod/cm-10.2' into cm-10.2
Add GESTURE_SENSOR input source

Change-Id: If61a7e7bf2d8b2665db7ca57ed68a4462d0c1783
frameworks/native: Reset update buffer geometry

Reset update buffer geometry when setBuffersGeometry is invoked to
reallocate the buffer for the new resolution.

Change-Id: I5da0bc8739af5e7c619ee6185b33712015112672
Merge remote-tracking branch 'CyanogenMod/cm-10.2' into cm-10.2
fix build on non-QCOM_BSP

This reverts commit 7f3d20238aa25d6c87152b1d7c8854294df8d572
for non-QCOM_BSP.

Change-Id: I77ddb47641a3689b276df39143617a8ca86265d1
Merge "Add GESTURE_SENSOR input source" into cm-10.2
Merge remote-tracking branch 'CyanogenMod/cm-10.2' into cm-10.2
installd: Skip dexroot-on-cache for user builds

Change-Id: Ia724cce7e904558654f5a0ed853e817c768d1383
Merge remote-tracking branch 'CyanogenMod/cm-10.2' into cm-10.2
Add support for QC's time_daemon

Enabled by BOARD_USES_QC_TIME_SERVICES=true, it requires the device
to provide its own time_daemon executable and libtime_genoff.so
proprietaries. The library should be copied by the device's setup
config to $OUT/obj/lib for linkage (and pushed to the final build,
obviously)

Change-Id: Ie6964dbe2692dc33fc04093a5b89b6922d8443c8
Merge remote-tracking branch 'CyanogenMod/cm-10.2' into cm-10.2