drm_hwcomposer: implement the safe handling of layers

This is a sweeping change to discard our usage of struct hwc_layer_t outside
hwcomposer.cpp. That was a dangerous struct that was a source of many of our
errors. Replacing it with safer RAII-style classes reduces the amount and
complexity of our code.

Change-Id: I580cafdf89bd1e7e6583f3073858b8e78e6018ba
diff --git a/glworker.h b/glworker.h
index ce41444..b3163ce 100644
--- a/glworker.h
+++ b/glworker.h
@@ -33,13 +33,15 @@
 
 namespace android {
 
+struct DrmCompositionLayer;
+
 class GLWorkerCompositor {
  public:
   GLWorkerCompositor();
   ~GLWorkerCompositor();
 
   int Init();
-  int Composite(hwc_layer_1 *layers, size_t num_layers,
+  int Composite(DrmCompositionLayer *layers, size_t num_layers,
                 const sp<GraphicBuffer> &framebuffer);
   void Finish();