Simpler way to deal with the FBO multi-cache.

This change removes the need for the SortedList and instead just
add a generated id to each FBO stored in the cache. This is an
artificial way to store several FBOs with the same dimensions.

Change-Id: I9638364e9bdc0f2391261937a0c86096f20505bf
diff --git a/libs/hwui/Layer.h b/libs/hwui/Layer.h
index 70d64ca..586a05e 100644
--- a/libs/hwui/Layer.h
+++ b/libs/hwui/Layer.h
@@ -30,14 +30,21 @@
  * Dimensions of a layer.
  */
 struct LayerSize {
-    LayerSize(): width(0), height(0) { }
-    LayerSize(const uint32_t width, const uint32_t height): width(width), height(height) { }
-    LayerSize(const LayerSize& size): width(size.width), height(size.height) { }
+    LayerSize(): width(0), height(0), id(0) { }
+    LayerSize(const uint32_t width, const uint32_t height): width(width), height(height), id(0) { }
+    LayerSize(const LayerSize& size): width(size.width), height(size.height), id(size.id) { }
 
     uint32_t width;
     uint32_t height;
 
+    // Incremental id used by the layer cache to store multiple
+    // LayerSize with the same dimensions
+    uint32_t id;
+
     bool operator<(const LayerSize& rhs) const {
+        if (id != 0 && rhs.id != 0) {
+            return id < rhs.id;
+        }
         if (width == rhs.width) {
             return height < rhs.height;
         }