SurfaceFlinger: Change to support client target flip

- Add support to flip framebuffer target if
  HWC2 implementation requests for it.

b/38114488
b/68271386
CRs-Fixed: 2057401
Change-Id: I91422ef60a139cbaf491db219b216cd1252e7e63
Signed-off-by: Madhuri Athota <mathota@codeaurora.org>
diff --git a/services/surfaceflinger/DisplayDevice.cpp b/services/surfaceflinger/DisplayDevice.cpp
index 2753f11..66ad0f1 100644
--- a/services/surfaceflinger/DisplayDevice.cpp
+++ b/services/surfaceflinger/DisplayDevice.cpp
@@ -217,7 +217,7 @@
 }
 
 void DisplayDevice::swapBuffers(HWComposer& hwc) const {
-    if (hwc.hasClientComposition(mHwcDisplayId)) {
+    if (hwc.hasClientComposition(mHwcDisplayId) || hwc.hasFlipClientTargetRequest(mHwcDisplayId)) {
         mSurface.swapBuffers();
     }