SF: Add flag for swaprect status in HAL

We need to check in HAL whether swap rect
is enable or disable to calculate wormhole region.

Change-Id: I4fbff4119856e41694e2065141b40fdd7a15f375
SurfaceFlinger: Change to support framebuffer flip for 2D blitters

- Surfaceflinger does not flip framebuffers when there are
  no layers marked for HWC_FRAMEBUFFER
- This change checks for the HWC_BLIT flag and will request a flip
  to a new FB_TARGET buffer even if there are no FRAMEBUFFER layers

Change-Id: I1cb44389a05c9ec049d7f0d39c288feccb11a91c
Display: Define new composition type for blit composition

This change defines a new flag 'hasBlitComp' to identify
blit composition. This flag is used to enable the swap rect
feature for blit composition cases.

Change-Id: Ic523e19796a893efbfc3bff300d1f982cba5ddfa
Revert "Add sessionId metadata with every buffer queued through Surface"

This reverts commit 85743373ed7d4eb6cb58412bda6c74f9ee29f06f.
This change is no longer needed

Change-Id: Ia5612b42f081236db65ac8eef9d359dfd23f4117
surfaceflinger: Conditional compilation for swaprect feature

 * Since this now calls into the HAL, we can only support it on
   devices which use the new version.

Change-Id: I231d70ac3d17fd2198f3929057c1edb0f158c099
Do not just silently fail if surface creation fails

Some apps do not check if they actually got a surface (e.g. bootanimation)
So this helps the track crashes down to the cause.

Change-Id: I6e74bdb52ad7ebe260b0ec1777c585781f6bbd42
[2/2] Speed up booting on multicore devices.

Add multithreading support.

Change-Id: I13630de9d75d13c0368d261b3564b787067b65b1
native: TRDS 3.0 and new theme engine preparation (2/4)

For the one who do not know this feature see as reference
the first two versions here:

https://github.com/SlimRoms/frameworks_base/commit/b330fde28306286572ba390e451a72539c0c3576

https://github.com/SlimRoms/frameworks_base/commit/3194015737b7944b4185fca007b8d167a0675cd8

we got now over a year now a lot experience how to handle the qualifier fallback
as well how to theme it and how to handle other apps. Based on this knowledge we
redid some parts of TRDS engine with following new features/additions and fixes
to have now a final perfect working TRDS

- compared to the old versions where it was needed on some apps to restart them
  in background this is not needed any more. All is handled about the internal
  AOSP resource handling and on qualifier change the caches are cleared
  and the apps get an onconfigurationchanged to restart the activity
  like it is doing on orientation change eg
- inverted folder is now depreciated and the new folders are holodark
  and hololight which allows on the one hand a dark theme (at least
  how TRDS started) and a light based theme hololight
- This name change is mainly because of the new theme engine which
  will come which uses this as base to add 2 external themes at the same
  time and give the user the ability to switch between them. But this is
  still in early stages and this commit is just the preparation for it
- Two new automodes are now integrated. User can enable the twilight modus
  which enables/disables holodark/hololight depending on the daytime...means
  on the evening it switches to holodark on normal day it is hololight.
  The other automode is based on light conditions....means that if it is
  dark outside it switches to holodark....if we have bright light conditions
  it switches immediatelly to hololight. Due of the resource cache handling now
  this happens immediatelly for the user and feels completly system integrated
  and happens without delay. A bit comparable to some navigation tool for cars
  which can switch automatically from dark to light and back
- currently the auto modes as well the manual mode switches between holodark
  and hololight. Due that we do not have currently anything hololight themed
  in the source hololight = stock theme. We will give the user the ability
  later when done to choose between which modes the user want to switch
  (stock/holodark/hololight). But this does not make sense at the moment.
  As soon as we have done the light theme or theme engine (lets see what
  comes first) we will open the ability to choose it. This is only a small code change
- a lot small tweaks and fixes went as well into the new version

Whatever this commit as usual adds the support for it. The themeing is done in the
other commits by kroz which is as well way more extended then on the older versions

cheers
Change-Id: Ibc5aaec5661455477815043440fae86052a395ce