drm_hwcomposer: HWC3: Support batched commands for layer create/destroy

This feature aims to reduce CPU time by reducing the number of SF<->HWC
binder transactions.

See [this SF commit][1] for more information.

[1]: https://android.googlesource.com/platform/frameworks/native/+/96f866c272765474f0f28b4090e15092f55796d8
Change-Id: I5eb1934b614ffabffed077d925c64946fae09050
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
diff --git a/hwc3/Composer.cpp b/hwc3/Composer.cpp
index 28d096c..de875db 100644
--- a/hwc3/Composer.cpp
+++ b/hwc3/Composer.cpp
@@ -79,6 +79,10 @@
     caps->emplace_back(Capability::PRESENT_FENCE_IS_NOT_RELIABLE);
   }
 
+#if __ANDROID_API__ >= 35
+  caps->emplace_back(Capability::LAYER_LIFECYCLE_BATCH_COMMAND);
+#endif
+
   return ndk::ScopedAStatus::ok();
 }