ui: Allocate the custom buffer size in the failure case also

The custom buffer size was not being honored if memory allocation
failed in the first pass.
Also - removing an unnecessary check.

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

Change-Id: Ice64233a25edee763a36a3ba34230d1360a0d610
Merge branch 'cm-10.1' of github.com:CyanogenMod/android_frameworks_native into cm-10.1

Conflicts:
	libs/gui/Android.mk

Change-Id: I0a7ead87a578a41ee67f785be6ffae1f43076c12