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
libgui: Bring back support for mHeap-based screenshots

Older graphics libraries throw a hissy fit when trying to lock
buffers for Surface-based screenshots, on at least Tegra2/3 and
Exynos4 hardware.

This patch depends on the BOARD_EGL_NEEDS_LEGACY_FB board flag
and requires the ro.bq.gpu_to_cpu_unsupported property set to 1
in order to work

Change-Id: I7db955e2cdd120018e349c14290e975788e70ed3
hax: Split the exynos4/tegra legacy code paths

They hang up at different places, and require different fixes.
Tested on t3 and e4

Change-Id: I46257a7e9e6b6e093a5cb92eaaaef4bdd0435a12

Conflicts:
	include/gui/Surface.h
	libs/gui/Surface.cpp
	services/surfaceflinger/DisplayDevice.cpp
hwui: Update configuration for 2GB/1080p devices

Change-Id: I73357a35bee22d76d3fe8a98ece91c5c9d19371d
Merge "hwui: Update configuration for 2GB/1080p devices" into jb4.3
Revert "libgui: Bring back support for mHeap-based screenshots"

This reverts commit bf9599eb0b91f226ec6d5223116b8b81b259b634.

This one was supposed to be a temporary fix, thats the reason i marked it -2. Unless you are 100% sure this doesnt break any devices we should revert it!

Change-Id: I024e55dca4257d63d6d8bd9738cccb99abe68086
Native: toroplus radio fix due weird backlinks to surfacecomposer

Change-Id: Ife65e0e9eba10f856962869013fd4ba7e9fe5aef
Merge remote-tracking branch 'Slim/jb4.3' into jb4.3