Wait for buffers to drain

When a BufferQueue producer disconnects and reconnects, we retain
the previously-queued buffers but empty the slots.  This allows
the number of queued buffers to grow without limit.  The low-memory
killer does not approve.

Bug 11069934

Change-Id: Ia2eaa954c7a3904b54209a3701dba01689e204d8
due to surfaceflinger creating odd lines in display,
Revert remove support for glReadPixels screenshot path (commit 3ca76f4), and try dropping features from EGL config query before gving up
Add heap configuration for 1080p phones with 2048m

 * Increase heap start size to 16m to minimize GC with larger bitmaps

Change-Id: I8fbba2e5a2a2cf2d7a6898ca6bae8639d6cf5a19
Add support for custom buffer sizes..

Add native window properties NATIVE_WINDOW_SET_BUFFERS_SIZE to the
perform function of Surface to set the user defined size
of graphic buffers. This is needed for adding support for
the playback of interlaced content.

Change-Id: I8354c29d2ffcc03178fae86dfa449cbefd24ae55

Conflicts:

	include/gui/BufferQueue.h
	include/ui/GraphicBuffer.h
	libs/gui/IGraphicBufferProducer.cpp
	libs/ui/GraphicBuffer.cpp
(cherry picked from commit 989265bbdcaeab8ae59e8615aebc3a20b2775436)
(cherry picked from commit 25c5de066d911c4720cc6570a8bb9e21e899e4fb)
(cherry picked from commit e9a8f7b1f1334d4a36eebde3b3f7ff141ae26bc7)
SurfaceComposerClient: bring back getDisplayWidth, Height & Orientation

enable it with either ICS_CAMERA_BLOB or MR0_CAMERA_BLOB CFLAG

Change-Id: Ieb5d36ad2a87ed1f0aa28ae3afbd5d48c880d6ab

Conflicts:
	libs/gui/SurfaceComposerClient.cpp
Revert "Revert "Second try at adding a compatibility symbol for the MemoryBase constructor.""

jellybean camera driver need this symbol

This reverts commit 2dccfdcd265ca86cca5ac863d921e5c647b93073.

Change-Id: I6f44bcc285d83bcd9c48c42c2d54c874dedc74c7
Merge branch 'kk' of git://github.com/STS-Dev-Team/platform_frameworks_native.git into omni-44

Conflicts:
	include/gui/BufferQueue.h
	include/gui/GraphicBufferAlloc.h
	include/gui/IGraphicBufferAlloc.h
	include/gui/IGraphicBufferProducer.h
	include/gui/Surface.h
	include/ui/GraphicBuffer.h
	include/ui/GraphicBufferAllocator.h
	libs/gui/Android.mk
	libs/gui/BufferQueue.cpp
	libs/gui/GraphicBufferAlloc.cpp
	libs/gui/IGraphicBufferAlloc.cpp
	libs/gui/IGraphicBufferProducer.cpp
	libs/gui/Surface.cpp
	libs/gui/SurfaceComposerClient.cpp
	libs/ui/Android.mk
	libs/ui/GraphicBuffer.cpp
	libs/ui/GraphicBufferAllocator.cpp
	services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.cpp
	services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.h