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
Rework BOARD_EGL_NEEDS_LEGACY_FB implementation

The problem with the window format boils down to a circular
dependency that makes service startup hang, so skip a round of
queues-to-window-composer to avoid it but keep using regular
Surface objects as windows, instead of replacing them with
native windows.

Change-Id: I6fed0fe04928df370c298c68ac1eb6d5b5cfb214
surfaceflinger: Fix building with display-caf + QCOM_BSP

We need the right gralloc header in here

Change-Id: Iaef1a1b9e4b5c9a93ace0dfa2a427ee8ae026e7b
Squashed commit of installd changes

commit 28d7796cef6dfb1c892b736fc89c5bd9d919ff29
Author: rpcraig <rpcraig@tycho.ncsc.mil>
Date:   Wed Nov 28 09:23:18 2012 -0500

    Proper security labeling of multi-user data directories.

    This patch covers 2 cases. When an app is installed
    and the resulting data directory is created for all
    existing users. And when a new user is created and
    all existing app data directories are created for
    the new user.

    Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>

    Change-Id: I01f2a9084dfe7886087b1497070b0d7f2ad8478e

    Conflicts:
        cmds/installd/commands.c
        services/java/com/android/server/pm/Installer.java
        services/java/com/android/server/pm/PackageManagerService.java
        services/java/com/android/server/pm/Settings.java

commit 91dfb0045a0026b185fa66c5c95289335bd2d543
Author: Pawit Pornkitprasan <p.pawit@gmail.com>
Date:   Sun Dec 25 17:37:53 2011 +0700

    installd: Delete cache properly for devices using datadata partition

    The java side already checks /data/data for free space but installd
    still checks /data causing it to never reap the cache (because it
    thinks that enough free space is available.)

    Change-Id: I736af6ff7ea0c8ae07900168f6b8ac2f7a4dbe0b

commit 777c17568851e1dc8b02213b2a77a3d7b456fc7d
Author: ctso <ctsoyars@gmail.com>
Date:   Thu Jun 24 02:03:47 2010 +0000

    DexOpt anything on /system in /cache/dalvik-cache

    Change-Id: Id41d37047f2fcb90d513ac091dfcb85492473689

    Allow property to disable dexopt on /cache

    Change-Id: Ic74707c4bead387bbf82e4c6d5037efc2d2ebeaf

Change-Id: Ic74707c4bead387bbf82e4c6d5037efc2d2ebeaf
hwui: Update configuration for 2GB/1080p devices

Change-Id: I73357a35bee22d76d3fe8a98ece91c5c9d19371d
Revert "Rework BOARD_EGL_NEEDS_LEGACY_FB implementation"

This reverts commit 1c01d2b237a8bad651be594b8e67db6abd24c57f, it's
not reliable on Mali
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
fix a possible deadlock when removing a layer and destroying a client

generally the last reference to a Layer is released in commitTransaction()
with mStateLock held. Layer itself only holds weak references to Client,
however, ~Layer() briefly promotes this weak reference -- during that time
the all other strong references to that Client go away, ~Layer is left with
the last one... then hell breaks loose as ~Client is called, which in turn
needs to acquire mStateLock.

We fix this by holding a temporary copy of the drawing state during
the transaction so that the side-effects of copying the current
state into the drawing state are seen only after mStateLock has
been released.

Bug: 9106453
Change-Id: Ic5348ac12283500ead87286a37565e8da35f1db2
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
Merge "Squashed commit of installd changes" into cm-10.2
Surface: Fix gralloc flags conflicting values.

Due to some custom code, unwanted flags (HW) got added with SW flags.
Restrict the flags to custom ones.

Change-Id: I2ab1c75eef4d6d16f0dd7d43aff3c7377486801a
sf: virtual display clean up

  Since HAL allows Virtual devices, remove virtual display id
  check during setup of virtual display.

Change-Id: I6ec93c0f06842b69e6677f05ae8b45fb1f4225f6
libgui: Fix building with QCOM_BSP + CAF display

Change-Id: Iaf0eb69fa7f409144a266ada683fceb835f62aff
Merge "fix a possible deadlock when removing a layer and destroying a client" into cm-10.2
Forward-port surface dithering from CM10.1

This allows the use of 16-bit color displays without excessive color
banding;

Change-Id: Icb469b9cb4beb686516c60bb576dbd0a73f505e0
Revert "Simplify OpenGL TLS access on ARM."

This reverts commit 288870ebc3da8121b7a237a53280bd8b931b7a2f.

Conflicts:

	opengl/libagl/Android.mk
	opengl/libs/EGL/getProcAddress.cpp
	opengl/libs/GLES2/gl2.cpp
	opengl/libs/GLES_CM/gl.cpp

Change-Id: I1401ab19e3035c1ed132781f126aafc5149d66ae
Prefer 16bpp surface formats

Adds a property to use RGB565 surface formats for the opaque
surface default, enabled by default.

Change-Id: Iac9bbc8292a863e2ab86093df3ecf218e4ec61e1

Conflicts:
	services/surfaceflinger/SurfaceFlinger.cpp
don't use fence sync for qcom legacy display

Change-Id: I4e7df9ac5c6e2eb5e6f923c907d0ec8d391a93d8
separate mHeap-based screenshot from BOARD_EGL_NEEDS_LEGACY_FB

No need for the Exynos/Tegra legacy fb implementation on legacy
qcom. Add a separate flag for mHeap-based screenshot in case of
future extensions. Enable mHeap-based screenshot for legacy qcom
dislay.

Change-Id: I35ff015555f19a5ba2857ad3d765d02eb6b9acde
Add overlay support for camera

Change-Id: I4089f2ba9d4a23af6ce53e9d1ece08260511502d