Fixed sample video corrupted in MediaCodec mode.

Change-Id: Ibe11a83199f3db1ba6266a1a9e11c7fc24ceb554
related-to-bug: 6732061
merge in jb-release history after reset to jb-dev
Fix gralloc private flag for video playback

Change-Id: I5247adffd528fbabbe57de56e1ac1e5ae74662af
i9300: Clean up a bit usage flag hack

Change-Id: I355375e5d65381b4a256dbf934dacf6b2b935b98
frameworks/native: Add support for copybit in Surfaceflinger.

  - Use qcomuiclearRegion to punch hole in FB if using
    copybit composition
  - Skip GPU drawing if layers are flagged for copybit
  - Consider copybit composition while counting for
    layers updating FB

Change-Id: Ieb2937d276a5018916961b43850898066a15c17e
Merge "i9300: Clean up a bit usage flag hack" into jellybean
surfaceflinger: Fix ifdeffing

 * Fix bad ifdeffing from QC BSP code.

Change-Id: Ibd188c16fc6e95ee70dd13381db5406449c33c4d
Merge branch 'jb-release' of https://android.googlesource.com/platform/frameworks/native into aosp
exynos: Apply format usage flag hack to YUV420P

This is needed for planar format video in
addition to semiplanar.  Also, update the flag
to be more representative of what it REALLY does,
which is merely to add GRALLOC_USAGE_HW_FIMC1.

This fixes Netflix on Note 10.1 so it no
longer needs Developer Options hacks.

Change-Id: I31df87c252779e66a056b79b1f48779024ec0f30
graphics: Add directives for compatibility with older EGL blobs (1/2)

- Define MISSING_EGL_EXTERNAL_IMAGE for EGL libraries without
  GL_OES_GLES_image_external
- Define MISSING_GRALLOC_BUFFERS for gralloc HALS without the
  0x800 (USAGE_HW_COMPOSER) usage
- Define MISSING_EGL_PIXEL_FORMAT_YV12 for libraries who don't
  recognize the Android YV12 colorspace
- Define FORCE_EGL_CONFIG=<value> for blobs which mis-identify the
  usable EGL configuration (pick the value from a CM7 log)

A typical GB library set will need
COMMON_GLOBAL_CFLAGS += -DMISSING_EGL_EXTERNAL_IMAGE -DMISSING_EGL_PIXEL_FORMAT_YV12 -DMISSING_GRALLOC_BUFFERS

Original Patch by Ricardo Cerqueira <github@cerqueira.org>.
Ported over to JB by vork <boss.benedikt@googlemail.com>
libgui: Add workaround for older Tegra2 devices

 * Commit e2fa30cba0c3412d07214dec346bb21a562d3461 breaks some older
   graphics drivers. Add a board flag to work around it.

Original for ics by Steve Kondik <shade@chemlab.org>
Ported to JB by vork <boss.benedikt@googlemail.com>
Create a additional stub for the cam.

This fixes:
E/HAL     ( 1015): Cannot load library: link_image[1916]:  1015 could not load needed library 'libcamera.so' for 'camera.tegra.so' (reloc_library[1331]:  1015 cannot locate '_ZN7android7Overlay13dequeueBufferEPPv'...
libgui: Allow a device to force asynchronous composition

Part of the "hack all the things" series for devices with old
EGL blobs, do async mode when the requested usage includes
HW_RENDERER, to avoid timing issues and stuck buffers.
Enable with the EGL_ALWAYS_ASYNC flag.

Original patch by Ricardo Cerqueria
SurfaceTexture: dequeueBuffer hack for older EGL blobs

If MISSING_GRALLOC_BUFFERS is defined (i.e., we're already hacking
around the lack of native buffers), allow retrying buffer dequeues
when the operation returns an error.
Based on work by "rapmv78" at xda-developers
(http://forum.xda-developers.com/showpost.php?p=20342919&postcount=1)

Original patch by Ricardo Cerqueira
surfaceflinger: Add support for LGE's HDMI rotation

Use BOARD_USES_LGE_ROTATION to align the HDMI output orientation
with the devices's

Original patch by Ricardo Cerquiera
return true for eglSwapBuffers
Merge github.com:ethansp/android_frameworks_native into jellybean