frameworks/native: Modify dirtyRect only on GPU pre-rotation.

Modify layer dirtyRect only when the buffers are pre-rotated by
GPU, not when the buffers are scheduled to be rotated during
composition.

Change-Id: I6dd3c0a9c62fd2b48e58ecd872b37b0655a02958
sf: Fix incorrect state reporting in dumpsys

Dumpsys utility access layer compositionType variable
with out proper protection. These variables are modified
during hwc_prepare call. Existing HAL lock protection is not
sufficient to address this issue. Failure to do this will
result in incorrect state reporting in dumpsys.

A new drawLock mutex in HWComposer that will be used in both
dumpsys and draw calls to ensure correct state is accessed.

Change-Id: I6289e0a3d1f5bbf35a18ddcd0538c9cda3e96c27
sf: Enable GPU Tiled DR optimization for overlap and mixed mode use cases

Extend the GPU Tiled DR optimization to Overlapping layers use cases
and mixed mode composition.

Change-Id: Iaba496be21d5c4ceeedfe3405cf26b36677cd14b
Merge remote-tracking branch 'cm/cm-11.0' into cm-11.0
Binder: Resolve race condition

The transaction buffer does not be freed before sendReply,
which may result in the next command fails. e.g. If one
application immediately creates another player to play next
video clip after releases the previous one, the setup may
fail for the native player does not be freed and the surface
is still connected to the previous one.

Change-Id: Id4ce215e5558edeb7468c8b08ec939f578beb184
Signed-off-by: Yiming Cao <ym.caoyiming@gmail.com>
SF: Check ViewFrame validity before sending to hwc

Check if ViewFrame is valid before sending to hwc to make sure
composition produces valid values.

A ViewFrame can get invalid values when the framework is disconnected
which is a step necessary for some testing scenarios.

Change-Id: I2ad76061b6664dbb7d2aa3d66acaf99b880aedfe
Merge remote-tracking branch 'cm/cm-11.0' into cm-11.0
sf: Clear FrameBuffer only if there are GLES composed layers

Clear FrameBuffer Target only if there are layers to be composed by
GLES. Otherwise, it results unnecessary gl calls and increases power
consumption in full MDP comp use cases.

Change-Id: Ib84c4fe154bb67668e4e8b8ce2f2328c55aed7c6
Merge remote-tracking branch 'cm/cm-11.0' into cm-11.0
Use project pathmap

Change-Id: Ib22d852cbb3a65a8ea0bca611d683fe2c4aec84b
Merge remote-tracking branch 'cm/cm-11.0' into cm-11.0
omx: Add nBitsPerSample parameter for FLAC

 * Necessary to convey this information from the extractor.

Change-Id: Ic6f689df9d5f840280bf0410021f6d6ee04a48d5
Merge remote-tracking branch 'cm/cm-11.0' into cm-11.0
native: Make setting the buffers size conditional to qualcomm hardware

This is a partial ifdef of CAF commit d6eecf50919312c1dd778c5742de72bb98f98f1a.

Some devices might have proprietary bits that link against libgui/libui components
and are not expecting the ABI mismatch introduced in that commit.

Change-Id: I0670990fcb903ee750d4d2925175b9588cf35f45
Merge remote-tracking branch 'cm/cm-11.0' into cm-11.0
sensorservice: add fusion sensors if all events are supported

- Fusion sensors depend on gyro, mag field, and accelerometer
  events in order to emulate these sensors.  Don't create
  them unless ALL of the real hardware devices required exist.

Change-Id: I1bce167a52c2dfc56a07450f858b01b78c39b7fe
Merge remote-tracking branch 'cm/cm-11.0' into cm-11.0
Merge remote-tracking branch 'hydra/cm-11.0' into cm-11.0