Forward-port surface dithering from CM10.1

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

Change-Id: Icb469b9cb4beb686516c60bb576dbd0a73f505e0
Add libpng include path

 Forward compatibility change

Change-Id: Iae792715d9a9aea34f53cd6383981371835c4a31
SurfaceFlinger: Dont show Animation on External Display

- With this change the animation effect will not be shown on
  external display.
- It will change from portrait to landscape in one shot.
- Primary would still continue the animation effect
- set property sys.disable_ext_animation to disable animation

Change-Id: Ibd94bf166f08eeab1d504afe69230f7c6a617eb6
CRs-fixed: 453747
surfaceflinger: don't handle EVENT_ORIENTATION when !HWC_DEVICE_API_VERSION_1_0

a184463 causes segfault on boot for the enrc2b (and probably others), this fixes it.

Change-Id: Ic4a7a05b44c8cc44a0d25c56def4acdf5b0939df
native: do not use global cpp flag

at least the result is the same but let us user the
propper way like we do it with all flags and do not
set if over a global cpp flag

Change-Id: I4ac4c07fd84eb959d844eb15394f0c6cf209d4a1
Don't use fence sync for qcom legacy

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

Change-Id: Ifecc7af579bfde9d0a7daaaf528ea0773ce6ceb2

Conflicts:
	libs/gui/Android.mk
surfaceflinger: enable EGL_NEEDS_FNW for qcom legacy

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

Change-Id: Ia6df94e8380062d646e29f293e5dc768e8a138e7
Unbreak libgui

Change I2c0f05d1f70b96ad801971f23f6f9cf4e0fa7167 broke libgui for a
bunch of pre-4.1 blobs by changing the surfaceclient API, so bring
it back

Change-Id: I1f6ce3b886539d0e972bbe41116192bf162be968

Conflicts:
	include/gui/SurfaceComposerClient.h
	libs/gui/SurfaceComposerClient.cpp
Merge remote-tracking branch 'github/jb4.3' into slim4.3

Conflicts:
	services/surfaceflinger/Android.mk