ENGR00243337 Enable swap rectangle for surfaceflinger

swap rectangle feature can reduce composing region to improve performance,
also reduce power consumption during UI partial update, like mouse moving.

Google enabled this feature in Android 3.0 and the older versions,
but removed it now since some GPU devices have no this feature.

Add this feature back because i.mx6 GPU support swap rectangle.

Change-Id: Idc5665dad22728b708cc9ac9404515d163a70638
Signed-off-by: Xianzhong <b07117@freescale.com>
ENGR00251253 Fixed UI flicker with swap rectangle

JB4.2 UI flicker in setting user name edit window.

The root cause is imx6 gpu 3d has alignment limitation
in resolving and cannot resolve front buffer correctly,
this is a workaround to draw the whole screen in 3d composition.

Signed-off-by: Xianzhong <b07117@freescale.com>
ENGR00254858 Remove unnecessary error logs

Remove logs for eglSetSwapRectangleANDROID and dequeueBuffer BUSY error

Signed-off-by: Xianzhong <b07117@freescale.com>
ENGR00214328 add surface query frame lost function.

add surface query frame lost function.

Signed-off-by: Xiaowen Liu <b37945@freescale.com>
ENGR00269800 Support RGB565 FB device

Add HWC_DISPLAY_FORMAT query to hwc hal to get FB's format
Return FB0's format as VisualID to SurfaceFlinger

Signed-off-by: guoyin.chen <guoyin.chen@freescale.com>
ENGR00271884 enable i.MX6SL 2D acceleration for JB4.2.2

In order to enable GPU 2D acceleration without GPU 3D EGL context,
eglGetRenderBufferVIV and eglPostBufferVIV are added into SW EGL.

Signed-off-by: Xianzhong <b07117@freescale.com>
ENGR00272567 Add BGRA8888 support in libagl and framework

Add BGRA8888 EGL config support in libagl and remove
32bit RGBA8888 hard code in framework

Signed-off-by: Richard Liu <r66033@freescale.com>
ENGR00273103 fixed i.MX6SL UI flicker with 2D acceleration

3D draw and read surfaces should be bound in eglPostBufferVIV,
if it's bound to a context, update the buffer for 3D EGL context

Signed-off-by: Xianzhong <b07117@freescale.com>
ENGR00273268 add YUV format support in libagl eglCreateImageKHR

add YUV format support in libagl eglCreateImageKHR,
else libgui surfacetexture createImage report fail
on mx6sl platform when play video.

Signed-off-by: Richard Liu <r66033@freescale.com>
ENGR00275212 enable alpha and dim layer process by hwcomposer

enable alpha and dim layer process by hwcomposer,
else mx6sl UI operation is very slow, JB4.3 already
has such code for alpha layer, here we enable dim
layer also, pay attention it need define hwcomposer
version HWC_DEVICE_API_VERSION_1_2.

Signed-off-by: Richard Liu <r66033@freescale.com>
ENGR00215174 update to pass build for android 4.4.

change drawingState() to getDrawingState().
add getContentTransform() function to be used by LayerDim.

Change-Id: I9860c61ac3e8e230682e3e1929fdbed4dc9cb3b4
Signed-off-by: Liu Xiaowen <b37945@freescale.com>