Add plumbing for better text scaling

Fonts are now described by a transform matrix. This lead to switching
from a vector to a hashmap. This change therefore adds new comparators
and hash computations to Font.

Change-Id: I2daffa7d6287c18554c606b8bfa06640d28b4530
diff --git a/libs/hwui/LayerCache.cpp b/libs/hwui/LayerCache.cpp
index ce74cee..cfc5b04 100644
--- a/libs/hwui/LayerCache.cpp
+++ b/libs/hwui/LayerCache.cpp
@@ -67,6 +67,14 @@
 // Caching
 ///////////////////////////////////////////////////////////////////////////////
 
+int LayerCache::LayerEntry::compare(const LayerCache::LayerEntry& lhs,
+        const LayerCache::LayerEntry& rhs) {
+    int deltaInt = int(lhs.mWidth) - int(rhs.mWidth);
+    if (deltaInt != 0) return deltaInt;
+
+    return int(lhs.mHeight) - int(rhs.mHeight);
+}
+
 void LayerCache::deleteLayer(Layer* layer) {
     if (layer) {
         LAYER_LOGD("Destroying layer %dx%d, fbo %d", layer->getWidth(), layer->getHeight(),