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 branch 'cm-11.0' of https://github.com/CyanogenMod/android_frameworks_native into kk_mkt