MemoryHeapBase: ifdef for gingerbread/froyo compatibility

Allow to "revert" by a board config flag the offset member addon
see commit f24c4cd0f20 (aosp change id Ie618fb5c0718e)

This change is required to use overlay based proprietary camera libs
coming from gingerbread and froyo builds.

This change also requires a global cflag named BINDER_COMPAT
because a lot of modules use the MemoryHeap includes

Add this in your BoardConfig.mk :
COMMON_GLOBAL_CFLAGS += -DBINDER_COMPAT

Backported from /#/c/13317/

Change-Id: I2e5c10d3cd9584803dd282aa17650661d6499e5b

Conflicts:

	include/binder/MemoryHeapBase.h
Omap3 use this workaround too
temporary compatibility workaround for usage of MemoryBase
Merge remote-tracking branch 'cyan/cm-11.0' into cm-11.0

Conflicts:
	libs/binder/MemoryBase.cpp
Merge remote-tracking branch 'cyan/cm-11.0' into cm-11.0
Merge remote-tracking branch 'cyan/cm-11.0' into cm-11.0
Merge remote-tracking branch 'cyan/cm-11.0' into cm-11.0
Merge remote-tracking branch 'cyan/cm-11.0' into cm-11.0
Merge remote-tracking branch 'cyan/cm-11.0' into cm-11.0
Merge remote-tracking branch 'cyan/cm-11.0' into cm-11.0
Merge remote-tracking branch 'cyan/cm-11.0' into cm-11.0
Merge remote-tracking branch 'cyan/cm-11.0' into cm-11.0
Merge remote-tracking branch 'cyan/cm-11.0' into cm-11.0
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
surfaceflinger: Apply bugfixes to the correct hwc code paths

Changes I2deaf2ed101e8ea76708862a6bb67751b6078794 and
I1cb44389a05c9ec049d7f0d39c288feccb11a91c, both meant to deal
with corner-case layer states, were mistakenly merged into
the pre-1.0-hwc code paths. Move them to their intended locations

Change-Id: Idd6b3513cc36dda21b552eee97f9ea91793df18f
Merge branch 'cm-11.0' of https://github.com/CyanogenMod/android_frameworks_native into cm-11.0
Graphics:Add error check when create GraphicBuffer

Change-Id: Ib0ca59bf1dfe4ae0266c29c91c1dbe3d02c0904e
Author: Lingyun Zhu <lingyun.zhu@intel.com>
Signed-off-by: Lingyun Zhu <lingyun.zhu@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 50141