Bug 895086 - Remove unused find_from_uniqueID() function from SkFontHost_linux r=mattwoodrow
authorGeorge Wright <gw@gwright.org.uk>
Wed, 17 Jul 2013 16:28:07 -0400
changeset 139190 335cc6c4568eaa82130c36f861c35c27262d38a6
parent 139189 20ccaa1b374a5bf021dde6b9b9915ef355adf8da
child 139192 fcb3ec4a9fca766b65211bb20376375aeb0af12f
push id1890
push userryanvm@gmail.com
push dateFri, 19 Jul 2013 17:44:21 +0000
treeherderfx-team@20848adc9980 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs895086
milestone25.0a1
Bug 895086 - Remove unused find_from_uniqueID() function from SkFontHost_linux r=mattwoodrow
gfx/skia/patches/0001-Bug-895086-Remove-unused-find_from_uniqueID-function.patch
gfx/skia/src/ports/SkFontHost_linux.cpp
new file mode 100644
--- /dev/null
+++ b/gfx/skia/patches/0001-Bug-895086-Remove-unused-find_from_uniqueID-function.patch
@@ -0,0 +1,38 @@
+From 58861c38751adf1f4ef3f67f8e85f5c36f1c43a5 Mon Sep 17 00:00:00 2001
+From: George Wright <gw@gwright.org.uk>
+Date: Wed, 17 Jul 2013 16:28:07 -0400
+Subject: [PATCH] Bug 895086 - Remove unused find_from_uniqueID() function from
+ SkFontHost_linux
+
+---
+ gfx/skia/src/ports/SkFontHost_linux.cpp | 14 --------------
+ 1 file changed, 14 deletions(-)
+
+diff --git a/gfx/skia/src/ports/SkFontHost_linux.cpp b/gfx/skia/src/ports/SkFontHost_linux.cpp
+index df21014..05b73dc 100644
+--- a/gfx/skia/src/ports/SkFontHost_linux.cpp
++++ b/gfx/skia/src/ports/SkFontHost_linux.cpp
+@@ -117,20 +117,6 @@ static FamilyRec* find_family(const SkTypeface* member) {
+     return NULL;
+ }
+ 
+-static SkTypeface* find_from_uniqueID(uint32_t uniqueID) {
+-    FamilyRec* curr = gFamilyHead;
+-    while (curr != NULL) {
+-        for (int i = 0; i < 4; i++) {
+-            SkTypeface* face = curr->fFaces[i];
+-            if (face != NULL && face->uniqueID() == uniqueID) {
+-                return face;
+-            }
+-        }
+-        curr = curr->fNext;
+-    }
+-    return NULL;
+-}
+-
+ /*  Remove reference to this face from its family. If the resulting family
+  is empty (has no faces), return that family, otherwise return NULL
+  */
+-- 
+1.8.3.1
+
--- a/gfx/skia/src/ports/SkFontHost_linux.cpp
+++ b/gfx/skia/src/ports/SkFontHost_linux.cpp
@@ -112,30 +112,16 @@ static FamilyRec* find_family(const SkTy
                 return curr;
             }
         }
         curr = curr->fNext;
     }
     return NULL;
 }
 
-static SkTypeface* find_from_uniqueID(uint32_t uniqueID) {
-    FamilyRec* curr = gFamilyHead;
-    while (curr != NULL) {
-        for (int i = 0; i < 4; i++) {
-            SkTypeface* face = curr->fFaces[i];
-            if (face != NULL && face->uniqueID() == uniqueID) {
-                return face;
-            }
-        }
-        curr = curr->fNext;
-    }
-    return NULL;
-}
-
 /*  Remove reference to this face from its family. If the resulting family
  is empty (has no faces), return that family, otherwise return NULL
  */
 static FamilyRec* remove_from_family(const SkTypeface* face) {
     FamilyRec* family = find_family(face);
     SkASSERT(family->fFaces[face->style()] == face);
     family->fFaces[face->style()] = NULL;