Bug 721803 - Add known-good devices to direct texture whitelist r=blassey
authorJames Willcox <jwillcox@mozilla.com>
Mon, 30 Jan 2012 22:38:16 -0500
changeset 87021 f123328d6dacc248a608825864ad7437ed847ab6
parent 87020 47a3904d3523a722725f4f30804478e92b815478
child 87022 a3e88a6dd4c9e0592a2dcf1e4ce43073b6f1ef0c
push id805
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 18:17:35 +0000
treeherdermozilla-aurora@6fb3bf232436 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersblassey
bugs721803
milestone12.0a1
Bug 721803 - Add known-good devices to direct texture whitelist r=blassey
widget/android/AndroidGraphicBuffer.cpp
--- a/widget/android/AndroidGraphicBuffer.cpp
+++ b/widget/android/AndroidGraphicBuffer.cpp
@@ -450,19 +450,29 @@ AndroidGraphicBuffer::Bind()
     return false;
   }
 
   clearGLError();
   sGLFunctions.fImageTargetTexture2DOES(GL_TEXTURE_2D, mEGLImage);
   return ensureNoGLError("glEGLImageTargetTexture2DOES");
 }
 
-static const char* sAllowedBoards[] = {
-  "venus2", // Motorola Droid Pro
-  "tuna", // Galaxy Nexus
+static const char* const sAllowedBoards[] = {
+  "venus2",     // Motorola Droid Pro
+  "tuna",       // Galaxy Nexus
+  "omap4sdp",   // Amazon Kindle Fire
+  "droid2",     // Motorola Droid 2
+  "targa",      // Motorola Droid Bionic
+  "spyder",     // Motorola Razr
+  "shadow",     // Motorola Droid X
+  "SGH-I897",   // Samsung Galaxy S
+  "GT-I9100",   // Samsung Galaxy SII
+  "sgh-i997",   // Samsung Infuse 4G
+  "herring",    // Samsung Nexus S
+  "sgh-t839",   // Samsung Sidekick 4G
   NULL
 };
 
 bool
 AndroidGraphicBuffer::IsBlacklisted()
 {
   nsAutoString board;
   if (!AndroidBridge::Bridge()->GetStaticStringField("android/os/Build", "BOARD", board))
@@ -475,16 +485,17 @@ AndroidGraphicBuffer::IsBlacklisted()
     return false;
   }
 
   if (Preferences::GetBool("direct-texture.force.disabled", false)) {
     LOG("disallowing board '%s' due to prefs override", boardUtf8);
     return true;
   }
 
+  // FIXME: (Bug 722605) use something better than a linear search
   for (int i = 0; sAllowedBoards[i]; i++) {
     if (board.Find(sAllowedBoards[i]) >= 0) {
       LOG("allowing board '%s' based on '%s'\n", boardUtf8, sAllowedBoards[i]);
       return false;
     }
   }
 
   LOG("disallowing board: %s\n", boardUtf8);