Commit cf38d958 authored by Doug Sherk's avatar Doug Sherk
Browse files

Bug 710432: fix Linux GfxInfo to do feature checks r=joe

Also includes changes to allow Linux GfxInfo to provide a vendor and device
id.
parent 1a923cc3
Loading
Loading
Loading
Loading
+47 −40
Original line number Diff line number Diff line
@@ -279,6 +279,10 @@ GfxInfo::GetFeatureStatusImpl(PRInt32 aFeature,

  // Don't evaluate any special cases if we're checking the downloaded blocklist.
  if (!aDriverInfo.Length()) {
    // Only check features relevant to Linux.
    if (aFeature == nsIGfxInfo::FEATURE_OPENGL_LAYERS ||
        aFeature == nsIGfxInfo::FEATURE_WEBGL_OPENGL ||
        aFeature == nsIGfxInfo::FEATURE_WEBGL_MSAA) {
      GetData();

      // Disable OpenGL layers when we don't have texture_from_pixmap because it regresses performance. 
@@ -323,6 +327,7 @@ GfxInfo::GetFeatureStatusImpl(PRInt32 aFeature,
        *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DEVICE;
      }
    }
  }

  return GfxInfoBase::GetFeatureStatusImpl(aFeature, aStatus, aSuggestedDriverVersion, aDriverInfo, &os);
}
@@ -441,7 +446,8 @@ GfxInfo::GetAdapterDriverDate2(nsAString & aAdapterDriverDate)
NS_IMETHODIMP
GfxInfo::GetAdapterVendorID(nsAString & aAdapterVendorID)
{
  aAdapterVendorID.AssignLiteral("");
  GetData();
  CopyUTF8toUTF16(mVendor, aAdapterVendorID);
  return NS_OK;
}

@@ -456,7 +462,8 @@ GfxInfo::GetAdapterVendorID2(nsAString & aAdapterVendorID)
NS_IMETHODIMP
GfxInfo::GetAdapterDeviceID(nsAString & aAdapterDeviceID)
{
  aAdapterDeviceID.AssignLiteral("");
  GetData();
  CopyUTF8toUTF16(mRenderer, aAdapterDeviceID);
  return NS_OK;
}