Surface: fix copy back dirty region

Copyback dirty region logic does copyback,
even when its not necessary causing 2ms delay.
Fix the logic to copy back only what is necessary.

(cherry picked from commit 9dc653a0fe16e70469a1a55f55da1a47c30d4d95)

Change-Id: I52de68258ac9f87d704ee5401f93417805fa6773
Merge "Surface: fix copy back dirty region" into android-4.4
binder: add another compat symbol

- Extend https://gerrit.omnirom.org/#/c/2324/
- Some old blobs, mainly LGE libs need this

Change-Id: Ia0370fecff24348aefa17aa7de2609535323e9b0
sensorservice: Fix init sequence for pre-1.1 API sensor HALs

The sensors API introduced a new flush() method that older binaries
won't have. For those, replace the firstFlush invocation with a
setDelay call since a lot of implementations interpreted that as
the initialization step.
We also don't want any kind of call to flush() to happen when it
isn't there, since it'll either hit a random OEM extension or
a memory address we really don't want to execute.

Change-Id: I26ce923fe385751fed7d1c483a53c074249f0620
Add setOrientation back

	this is needed for some tegra ICS and JB_MR0 prebuilts

Change-Id: I7b534555253ede3d0061abd09e22330d5eaf3cd9
Enable the use of old HWComposer APi

Tegra 2 devices like TF101 need this to stop surfaceflinger from crashing, causing hotboots
Board flag is BOARD_NEEDS_OLD_HWC_API := true

Change-Id: I931be737b809427c6ce1c9f61200687450b14a8d

Conflicts:

	services/surfaceflinger/Android.mk
Update HWUI config for xxhdpi/2GB devices

Change-Id: Ic9ba16b0360f2b755a1d23aa51eddc61beee2bac