surfaceflinger: Update support for hwc < 1.0

Add android::HWCLayerVersion0 implementations of the new methods

Change-Id: Ic199c9b4262049b74632a57ad2b2cdf462a05b43
Add a boardconfig to force HWC composition of virtual displays

When this boardconfig is defined, even when all virtual display
composition is done by GLES, the HWC will be forced to copy from the
GLES framebuffer to the output buffer. On some hardware this allows
HWC to do format conversions that would otherwise have to be done by
the consumer, with worse power and/or performance.

Bug: 8316155
Change-Id: If980ecc589f138cef063eafa757f7f748196713e
libgui: Add ICS/MR0-compatible client::createSurface constructors

Change-Id: Ia5b04d93320c65ac32a92cbd93daa6a64e6cee1c
dumpstate: Squash fixes from CM 10.0

commit ba3723de8d13126027706bbbe6f9657da231b9bd
Author: Mike Kasick <mike@kasick.org>
Date:   Wed Oct 31 20:31:05 2012 -0400

    dumpstate: Fix calls to su to specify a shell command

    Superuser's su requires that shell commands be specified with the "-c"
    option.  Fix calls to su to explicitly specify this option.

commit 78cd73fce82fd0b5ee98a6136c847932ba8c636b
Author: Mike Kasick <mike@kasick.org>
Date:   Wed Oct 31 18:53:58 2012 -0400

    dumpstate: Skip subsequent showmaps if the first run fails.

    dumpstate takes over six minutes to run as each call to "su" (which
    dumpstate uses opportunistically on states that require root privileges to
    access) takes approximately one second to process.

    The vast majority of these "su" calls are made to "showmap", which is
    called for every running process.  These calls nearly always fail, either
    because dumpstate is denied root access, or because "showmap" isn't
    installed.

    This greatly speeds up the dumpstate process by skipping subsequent
    "showmap" attempts if the first run (on process init) fails.

Change-Id: Ibdfa996afff541dc30251da7ab01ac4987ae2ebc
libgui: Add pre-MR2-compatible symbol for setPosition

SurfaceControl::setPosition now takes floats instead of integers as
arguments, which breaks linkability from pre-MR2 blobs. Add a direct
compatibility wrapper, since the values are treated in the same
way.

Change-Id: I0fd0708faeb4495a2dbbb659997d6500f165ec98
frameworks_native: Add back PixelFormatInfo
add BoardConfig flag TARGET_USES_OPENGLES_FOR_SCREEN_CAPTURE

This flag forces usage flags:
GRALLOC_USAGE_HW_TEXTURE and GRALLOC_USAGE_HW_RENDERER
in captureScreenImplLocked regardless of useReadPixels value

This fixes the EGL_NO_IMAGE_KHR error returned from
eglCreateImageKHR (blank images returned from screenshot path)

Change-Id: Ia782a918501b4fd40a58eef71c404584a44b8073
surfaceflinger: Set max acquired buffer count

If triple framebuffers are enabled, the number of acquired
buffers isn't increased by default. Set the count to one less
than the max buffers to make sure all three buffers come into
play.

Change-Id: I65054ed4004607f5be68c893f6f621e821cfbf1c