Avoid deadlock when deleting layers
Bug #7217459

Change-Id: I12bfa6c30c5030bd1b23ea6a3ce64240ab1dfba3
diff --git a/libs/hwui/Layer.h b/libs/hwui/Layer.h
index 420073a..d2cd440 100644
--- a/libs/hwui/Layer.h
+++ b/libs/hwui/Layer.h
@@ -45,10 +45,11 @@
  * A layer has dimensions and is backed by an OpenGL texture or FBO.
  */
 struct Layer {
-
     Layer(const uint32_t layerWidth, const uint32_t layerHeight);
     ~Layer();
 
+    void freeResourcesLocked();
+
     /**
      * Sets this layer's region to a rectangle. Computes the appropriate
      * texture coordinates.