libhwcomposer: print a log if there is any delay in vsync read.

If there is a delay in vsync read print a warning message if
vsync status is enabled.

Change-Id: I26ca86639a5e62949f0e8b2a31d0bf17ce630551
libexternal: Remove setExternalDisplay function call

Calling setExternalDisplay in setActionSafeDimension
is leading to WFD session disconnect.

Crs-Fixed: 495062
Change-Id: I7a6ea0d668d4447d59ed0a7a0ac442327d019b71
hwc: Define and Use mSecureLock

Define and Use mSecureLock in composition and binder
thread. This is to ensure both variables mSecureMode
and mSecuring are updated in binder thread without
any context switch to composition thread

Change-Id: Ibd701bd3363515e2f7e8a9711bbc5b66053cfa03
hotplug OFFLINE event should be sent

In case of HDMI is plugged when WFD session was going on
hotplug OFFLINE event should be sent to framework

CRs-fixed: 519796

Change-Id: I3600ee6b1ba18539da106c45c3f084f1c825b260
Merge "hotplug OFFLINE event should be sent"
Merge "libexternal: Remove setExternalDisplay function call"
HWC : Use Layer Caching in Video Only Use case on External

Currently Layer Caching is not used in Video only use case on
external. This causes GPU to redraw the UI layers every time.
This is causing under runs. This change will enable Layer
Caching in such use cases there by avoids  un necessary redraws.

Change-Id: Iedaf64b909dcd9d5b940c56c282c17a3b485637b
CRs-fixed: 514448
Merge "hwc: Define and Use mSecureLock"
Hwc: Allow MDP comp for upto 2-Layers with Alpha & scaling

Since we are allocating RGB pipes first, we can allow
MDP composition Upto 2 Layers with Alpha and scaling.

Change-Id: I6ceb2b1a2f9d2228530529d93352dc466e39eadc
CRs-fixed: 523212
Merge "HWC : Use Layer Caching in Video Only Use case on External"
Merge "Hwc: Allow MDP comp for upto 2-Layers with Alpha & scaling"
hwc: Increase precision in triming

Increase precision from float to double in triming calcs.
This improves the output. We need this since ultimately
we assign to int which would truncate excesses. With float
due to lower precision, we end up slightly lower than an
integral value.

Change-Id: I5d781b609be1761b746edf6503340f34a985b9e2
hwc: Do not show animation on External display.

- When primary is animating, the animation should not be
  shown on the external display.
- Mark all app layers as HWC_OVERLAY on external during
  animation so that SF wont compose it on FB.
- Remove default arguments from setMDPflags function to get rid of
  issues hidden from the developer.

Change-Id: Ic557cabfd9f2518614777c0e993541e36e090850

Change-Id: Ic78645675b0aaab284fe2d0de8fffb4b26beabc7
Revert "HWC : Use Layer Caching in Video Only Use case on External"

This reverts commit edfc717febd64a8cb7dae671aec4c3670485c162.
Merge "hwc: Increase precision in triming"
Merge "libhwcomposer: print a log if there is any delay in vsync read."
Merge "hwc: Do not show animation on External display."
Merge "Revert "HWC : Use Layer Caching in Video Only Use case on External""
display: External display refactor

  - cleans up external library
  - add separate library for virtual display
  - process virtual updates in its separate path
  in hwc.
  - Acquire blank mutex lock for one complete drawing
  cycle

Change-Id: Ib984c578464a131ecdb27ee48960f58d68b7a5a7
hwc: fix aspect ratio calculations

- Make aspectratio calculations independent of ext dpy w/h
- pass hwc_rect_t to getAspectRatioPosition function instead of
  x, y, w, h
- overload getAspectRatioPosition func to return the upscaled
  or transformed position for a particular display based on the
  values set by SurfaceFlinger

Change-Id: I0be9b2b4b030bdd8e69dc1493dc8cbac31918c27