Bug 1295899 - Implement DRIVER_BUILD_ID_LESS_THAN_OR_EQUAL. r=milan
authorChih-Yi Leu <cleu@mozilla.com>
Wed, 31 Aug 2016 19:59:00 +0200
changeset 312662 de297d5d37b02da326866231bcf97146fefbf425
parent 312661 282b5a199154910b2c07f38402467d2e769bb076
child 312663 5d11d2b3af0b81f14fd919110a3c2cff31e5324f
push id81423
push usercbook@mozilla.com
push dateMon, 05 Sep 2016 13:12:27 +0000
treeherdermozilla-inbound@66c195197831 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmilan
bugs1295899
milestone51.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1295899 - Implement DRIVER_BUILD_ID_LESS_THAN_OR_EQUAL. r=milan
widget/GfxDriverInfo.h
widget/GfxInfoBase.cpp
--- a/widget/GfxDriverInfo.h
+++ b/widget/GfxDriverInfo.h
@@ -61,16 +61,17 @@ enum class OperatingSystem {
   Android,
   Ios
 };
 
 enum VersionComparisonOp {
   DRIVER_LESS_THAN,             // driver <  version
   DRIVER_BUILD_ID_LESS_THAN,    // driver build id <  version
   DRIVER_LESS_THAN_OR_EQUAL,    // driver <= version
+  DRIVER_BUILD_ID_LESS_THAN_OR_EQUAL, // driver build id <= version
   DRIVER_GREATER_THAN,          // driver >  version
   DRIVER_GREATER_THAN_OR_EQUAL, // driver >= version
   DRIVER_EQUAL,                 // driver == version
   DRIVER_NOT_EQUAL,             // driver != version
   DRIVER_BETWEEN_EXCLUSIVE,     // driver > version && driver < versionMax
   DRIVER_BETWEEN_INCLUSIVE,     // driver >= version && driver <= versionMax
   DRIVER_BETWEEN_INCLUSIVE_START, // driver >= version && driver < versionMax
   DRIVER_COMPARISON_IGNORED
--- a/widget/GfxInfoBase.cpp
+++ b/widget/GfxInfoBase.cpp
@@ -370,18 +370,22 @@ BlacklistFeatureStatusToGfxFeatureStatus
   return nsIGfxInfo::FEATURE_STATUS_OK;
 }
 
 static VersionComparisonOp
 BlacklistComparatorToComparisonOp(const nsAString& op)
 {
   if (op.EqualsLiteral("LESS_THAN"))
     return DRIVER_LESS_THAN;
+  else if (op.EqualsLiteral("BUILD_ID_LESS_THAN"))
+    return DRIVER_BUILD_ID_LESS_THAN;
   else if (op.EqualsLiteral("LESS_THAN_OR_EQUAL"))
     return DRIVER_LESS_THAN_OR_EQUAL;
+  else if (op.EqualsLiteral("BUILD_ID_LESS_THAN_OR_EQUAL"))
+    return DRIVER_BUILD_ID_LESS_THAN_OR_EQUAL;
   else if (op.EqualsLiteral("GREATER_THAN"))
     return DRIVER_GREATER_THAN;
   else if (op.EqualsLiteral("GREATER_THAN_OR_EQUAL"))
     return DRIVER_GREATER_THAN_OR_EQUAL;
   else if (op.EqualsLiteral("EQUAL"))
     return DRIVER_EQUAL;
   else if (op.EqualsLiteral("NOT_EQUAL"))
     return DRIVER_NOT_EQUAL;
@@ -735,16 +739,19 @@ GfxInfoBase::FindBlocklistedDeviceInList
       match = driverVersion < info[i].mDriverVersion;
       break;
     case DRIVER_BUILD_ID_LESS_THAN:
       match = (driverVersion & 0xFFFF) < info[i].mDriverVersion;
       break;
     case DRIVER_LESS_THAN_OR_EQUAL:
       match = driverVersion <= info[i].mDriverVersion;
       break;
+    case DRIVER_BUILD_ID_LESS_THAN_OR_EQUAL:
+      match = (driverVersion & 0xFFFF) <= info[i].mDriverVersion;
+      break;
     case DRIVER_GREATER_THAN:
       match = driverVersion > info[i].mDriverVersion;
       break;
     case DRIVER_GREATER_THAN_OR_EQUAL:
       match = driverVersion >= info[i].mDriverVersion;
       break;
     case DRIVER_EQUAL:
       match = driverVersion == info[i].mDriverVersion;