drm_hwcomposer: Add type to DrmCompositionPlane

Instead of encoding the plane/composition type in source_layer,
move it to its own explicit type. This will allow us to expand
source_layer to include more than one layer.

BUG=b/28117135
TEST=compiles and runs on smaug

Change-Id: I19b1ed8e395347bbefb0fb6a0ab02d6ac0e5c1c1
Signed-off-by: Sean Paul <seanpaul@chromium.org>
diff --git a/drmdisplaycomposition.h b/drmdisplaycomposition.h
index 264963c..0362404 100644
--- a/drmdisplaycomposition.h
+++ b/drmdisplaycomposition.h
@@ -46,14 +46,18 @@
   std::vector<size_t> source_layers;
 };
 
+enum class DrmCompositionPlaneType : int32_t {
+  kDisable,
+  kLayer,
+  kPrecomp,
+  kSquash,
+};
+
 struct DrmCompositionPlane {
-  const static size_t kSourceNone = SIZE_MAX;
-  const static size_t kSourcePreComp = kSourceNone - 1;
-  const static size_t kSourceSquash = kSourcePreComp - 1;
-  const static size_t kSourceLayerMax = kSourceSquash - 1;
+  DrmCompositionPlaneType type;
   DrmPlane *plane;
   DrmCrtc *crtc;
-  size_t source_layer;
+  int source_layer;
 };
 
 class DrmDisplayComposition {
@@ -135,7 +139,7 @@
 
   int IncreaseTimelineToPoint(int point);
 
-  void EmplaceCompositionPlane(size_t source_layer,
+  void EmplaceCompositionPlane(DrmCompositionPlaneType type, int source_layer,
                                std::vector<DrmPlane *> *primary_planes,
                                std::vector<DrmPlane *> *overlay_planes);
   int CreateAndAssignReleaseFences();