drm_hwcomposer: Presentation to cursor plane

This change adds support for presenting to the cursor plane.
Logic is added to match cursor layers with cursor planes during
composition, plus additional test commit logic with backoff
behavior. Prior to this change, cursor planes were never
considered during composition. After this change, cursor
planes are available to be matched with compatible layers and
then used for presentation.

Change-Id: I3acd131cd210de46ff19af5a8960b07a82f462b2
Signed-off-by: Andrew Wolfers <aswolfers@google.com>
diff --git a/compositor/DrmKmsPlan.h b/compositor/DrmKmsPlan.h
index 054cd93..d0b271a 100644
--- a/compositor/DrmKmsPlan.h
+++ b/compositor/DrmKmsPlan.h
@@ -35,8 +35,9 @@
   std::vector<LayerToPlaneJoining> plan;
 
   static auto CreateDrmKmsPlan(DrmDisplayPipeline &pipe,
-                               std::vector<LayerData> composition)
-      -> std::unique_ptr<DrmKmsPlan>;
+                               std::vector<LayerData> composition,
+                               std::optional<LayerData> cursor_layer =
+                                   std::nullopt) -> std::unique_ptr<DrmKmsPlan>;
 };
 
 }  // namespace android