fix mem leak on error handling

Change-Id: I40d8e371c46184aa701fa676246201a9d8f6e27d
Abort surface composition if hw surface is invalid

If an invalid display device is detected during surface composition
(e.g., a simulated secondary display is removed), abort the
composition.

Change-Id: Ia6afb2e287882d8ae0614eb25463d3f85b687adf
provide overrides for hwui memory limits for xxhdpi phones

Change-Id: I8b369619cd07530d0468a5449da30f338c13c7d2
Merge remote-tracking branch 'CyanogenMod/cm-10.1' into cm-10.1
Revert "Revert "Fixed clang build error for libgui""

This reverts commit 54335bab0310dbe585f4f1a863b2751a4b38a565.
Merge remote-tracking branch 'CyanogenMod/cm-10.1' into cm-10.1
Merge https://github.com/legaCyMod/android_frameworks_native into pac42