Revert "get rid of MemoryHeapPmem"

This reverts commit 7a7524810a0950c1c2b18014a8f1c637275165c4 and
makes MemoryHeapPmem conditioned to BOARD_NEEDS_MEMORYHEAPPMEM

Change-Id: Ic1802b169ff35dfb26e507687648898d26a2f949
Revert "Revert "Compatibility work around for bad graphics driver dependency.""

This reverts commit 38b657265ccc5ae45bd7860a68b0d9373b47a2f3.

Change-Id: If350d73839f1ed5e01af4299d44837e619d14d66
libgui: Add ICS/MR0-compatible client::createSurface constructors

Change-Id: Ia5b04d93320c65ac32a92cbd93daa6a64e6cee1c
Revert "Fixed clang build error for libgui"

This reverts commit 114e968482a02b9153d9a236376efb5cd43f4a9a.
DisplayDevice: Backwards compatibility with old EGL

From 4.1 to 4.2, the display subsystem was reworked to
use SurfaceTextureClient/BufferQueue instead of
FramebufferNativeWindow for the framebuffer itself.

Unfortunately, some legacy EGL libraries make assumptions
that any framebuffer device will be FramebufferNativeWindow.

These EGL libraries will fail when used in 4.2 as if the
framebuffer is not FramebufferNativeWindow, they will
try to dequeue more than one buffer at a time, which
will cause a hang of the graphics subsystem.

This allows use of FramebufferNativeWindow to keep
legacy EGL implementations happy.  Confirmed EGL
implementations that need this include but are
not limited to:

Set BOARD_EGL_NEEDS_LEGACY_FB to use

Tegra2/3 ICS EGL
Mali400 ICS EGL (Allwinner A10)
Mali400 Jellybean (4.1) EGL (Samsung Exynos4)

Original implementation by OndraOrg of XDA:
http://forum.xda-developers.com/showpost.php?p=34469675&postcount=19

Change-Id: I74005cf6753b3c9bfb4c1e32fb641f5167787917
surfacetexture: 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

*Ported from ics
*ifdef for BOARD_ADRENO_DECIDE_TEXTURE_TARGET

Change-Id: I33c96bf09fbad0f3fe4ca84c796fca78db51704f
msm8660 Camera fixes  Not working WIP

Change-Id: Id8fcf18dd28d53cddb128e2f453ae0e448a16ab4
JB_MR1: native/libs/ui: Adding fix for conf 2.0 seg faults

function call to cancelBuffer was resulted in seg-faults on conf 2.0.
Setting function pointer of cancelBuffer to null in order to select
correct path of execution.
CRs-fixed: 383715

Change-Id: I6de8355febaea86ded63f33a582c787fef862193
SurfaceComposerClient: bring back getDisplayWidth, Height & Orientation

enable it with either ICS_CAMERA_BLOB or MR0_CAMERA_BLOB CFLAG

Change-Id: Ieb5d36ad2a87ed1f0aa28ae3afbd5d48c880d6ab
Revert "msm8660 Camera fixes  Not working WIP"

This reverts commit 2ec6b5bb7640b83e1d50b415fd4ee19569cd05a8.
Overlay support for legacy camera libs

Move http://review.cyanogenmod.com/#/c/13285/ to proper place for jellybean.

1. Rename OverlayHtc to Overlay in file names
2. Use BOARD_USES_LEGACY_OVERLAY to enable

Signed-off-by: Evan McClain <aeroevan@gmail.com>
Change-Id: I705bc802c7280eda273e881612165c5d3c30ea26
Merge tag 'android-4.2.2_r1' into jb422

Android 4.2.2 release 1
Merge "Overlay support for legacy camera libs" into jellybean
Merge "JB_MR1: native/libs/ui: Adding fix for conf 2.0 seg faults" into jellybean
SurfaceFlinger: Change to support framebuffer flip for 2D blitters

- Surfaceflinger does not flip framebuffers when there are
  no layers marked for HWC_FRAMEBUFFER
- This change checks for the HWC_BLIT flag and will request a flip
  to a new FB_TARGET buffer even if there are no FRAMEBUFFER layers

Change-Id: I1cb44389a05c9ec049d7f0d39c288feccb11a91c
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: Ic8e18bc60a7310b0fa90ad251381e9f7d9e58d5e
Merge remote-tracking branch 'aokp/jellybean' into jb-mr1

Conflicts:
	include/utils/Singleton.h
	libs/ui/Android.mk