Skip to content

Commit

Permalink
Bug 701948 - Rename nsIGfxInfo::FEATURE_NO_INFO to nsIGfxInfo::FEATUR…
Browse files Browse the repository at this point in the history
…E_STATUS_OK. r=jgilbert
  • Loading branch information
waltermoz committed Jul 1, 2014
1 parent e43bb97 commit cfa586e
Show file tree
Hide file tree
Showing 31 changed files with 56 additions and 57 deletions.
4 changes: 2 additions & 2 deletions browser/devtools/tilt/tilt-gl.js
Original file line number Diff line number Diff line change
Expand Up @@ -1550,8 +1550,8 @@ TiltGL.isWebGLSupported = function TGL_isWebGLSupported()
let opengl = gfxInfo.FEATURE_WEBGL_OPENGL;

// if either the Angle or OpenGL renderers are available, WebGL should work
supported = gfxInfo.getFeatureStatus(angle) === gfxInfo.FEATURE_NO_INFO ||
gfxInfo.getFeatureStatus(opengl) === gfxInfo.FEATURE_NO_INFO;
supported = gfxInfo.getFeatureStatus(angle) === gfxInfo.FEATURE_STATUS_OK ||
gfxInfo.getFeatureStatus(opengl) === gfxInfo.FEATURE_STATUS_OK;
} catch(e) {
if (e && e.message) { TiltUtils.Output.error(e.message); }
return false;
Expand Down
6 changes: 3 additions & 3 deletions content/canvas/src/WebGLContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ WebGLContext::SetDimensions(int32_t width, int32_t height)
if (mOptions.antialias &&
gfxInfo &&
NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_WEBGL_MSAA, &status))) {
if (status == nsIGfxInfo::FEATURE_NO_INFO || forceMSAA) {
if (status == nsIGfxInfo::FEATURE_STATUS_OK || forceMSAA) {
caps.antialias = true;
}
}
Expand All @@ -619,13 +619,13 @@ WebGLContext::SetDimensions(int32_t width, int32_t height)

if (gfxInfo && !forceEnabled) {
if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_WEBGL_OPENGL, &status))) {
if (status != nsIGfxInfo::FEATURE_NO_INFO) {
if (status != nsIGfxInfo::FEATURE_STATUS_OK) {
useOpenGL = false;
}
}
#ifdef XP_WIN
if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_WEBGL_ANGLE, &status))) {
if (status != nsIGfxInfo::FEATURE_NO_INFO) {
if (status != nsIGfxInfo::FEATURE_STATUS_OK) {
useANGLE = false;
}
}
Expand Down
2 changes: 1 addition & 1 deletion content/media/plugins/MediaPluginHost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ static bool IsOmxSupported()
if (gfxInfo) {
int32_t status;
if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_STAGEFRIGHT, &status))) {
if (status != nsIGfxInfo::FEATURE_NO_INFO) {
if (status != nsIGfxInfo::FEATURE_STATUS_OK) {
NS_WARNING("XXX stagefright blacklisted\n");
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion gfx/layers/d3d9/LayerManagerD3D9.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ LayerManagerD3D9::Initialize(bool force)
if (gfxInfo) {
int32_t status;
if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_DIRECT3D_9_LAYERS, &status))) {
if (status != nsIGfxInfo::FEATURE_NO_INFO && !forceAccelerate)
if (status != nsIGfxInfo::FEATURE_STATUS_OK && !forceAccelerate)
{
NS_WARNING("Direct3D 9-accelerated layers are not supported on this system.");
return false;
Expand Down
4 changes: 2 additions & 2 deletions gfx/thebes/gfxPlatform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2011,12 +2011,12 @@ InitLayersAccelerationPrefs()
if (gfxInfo) {
int32_t status;
if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_DIRECT3D_9_LAYERS, &status))) {
if (status == nsIGfxInfo::FEATURE_NO_INFO) {
if (status == nsIGfxInfo::FEATURE_STATUS_OK) {
sLayersSupportsD3D9 = true;
}
}
if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_DIRECT3D_11_LAYERS, &status))) {
if (status == nsIGfxInfo::FEATURE_NO_INFO) {
if (status == nsIGfxInfo::FEATURE_STATUS_OK) {
sLayersSupportsD3D11 = true;
}
}
Expand Down
2 changes: 1 addition & 1 deletion gfx/thebes/gfxWindowsPlatform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ gfxWindowsPlatform::UpdateRenderMode()
if (gfxInfo) {
int32_t status;
if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_DIRECT2D, &status))) {
if (status != nsIGfxInfo::FEATURE_NO_INFO) {
if (status != nsIGfxInfo::FEATURE_STATUS_OK) {
d2dBlocked = true;
}
}
Expand Down
4 changes: 2 additions & 2 deletions toolkit/modules/Troubleshoot.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -376,9 +376,9 @@ let dataProviders = {
// OpenGL feature, because that's what's going to get used. In all
// other cases we want to report on the ANGLE feature.
gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_WEBGL_ANGLE) !=
Ci.nsIGfxInfo.FEATURE_NO_INFO &&
Ci.nsIGfxInfo.FEATURE_STATUS_OK &&
gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_WEBGL_OPENGL) ==
Ci.nsIGfxInfo.FEATURE_NO_INFO ?
Ci.nsIGfxInfo.FEATURE_STATUS_OK ?
Ci.nsIGfxInfo.FEATURE_WEBGL_OPENGL :
Ci.nsIGfxInfo.FEATURE_WEBGL_ANGLE;
#else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ function run_test() {
function checkBlacklist()
{
var status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT2D);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_NO_INFO);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);

status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT3D_9_LAYERS);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_NO_INFO);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);

gTestserver.stop(do_test_finished);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ function run_test() {
function checkBlacklist()
{
var status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT2D);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_NO_INFO);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);

status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT3D_9_LAYERS);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_NO_INFO);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);

gTestserver.stop(do_test_finished);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ function run_test() {
function checkBlacklist()
{
var status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT2D);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_NO_INFO);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);

// Make sure unrelated features aren't affected
status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT3D_9_LAYERS);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_NO_INFO);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);

gTestserver.stop(do_test_finished);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ function run_test() {
function checkBlacklist()
{
var status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT2D);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_NO_INFO);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);

// Make sure unrelated features aren't affected
status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT3D_9_LAYERS);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_NO_INFO);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);

gTestserver.stop(do_test_finished);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function run_test() {

// Make sure unrelated features aren't affected
status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT3D_9_LAYERS);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_NO_INFO);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);

gTestserver.stop(do_test_finished);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ function run_test() {
function checkBlacklist()
{
var status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT2D);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_NO_INFO);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);

// Make sure unrelated features aren't affected
status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT3D_9_LAYERS);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_NO_INFO);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);

gTestserver.stop(do_test_finished);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function run_test() {

// Make sure unrelated features aren't affected
status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT3D_9_LAYERS);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_NO_INFO);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);

gTestserver.stop(do_test_finished);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function run_test() {

// Make sure unrelated features aren't affected
status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT3D_9_LAYERS);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_NO_INFO);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);

gTestserver.stop(do_test_finished);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function run_test() {

// Make sure unrelated features aren't affected
status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT3D_9_LAYERS);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_NO_INFO);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);

gTestserver.stop(do_test_finished);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ function run_test() {
function checkBlacklist()
{
var status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT2D);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_NO_INFO);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);

status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT3D_9_LAYERS);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_NO_INFO);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);

gTestserver.stop(do_test_finished);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ function run_test() {
{
if (get_platform() == "WINNT") {
var status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT2D);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_NO_INFO);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);
} else if (get_platform() == "Darwin") {
status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_OPENGL_LAYERS);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_NO_INFO);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);
}

gTestserver.stop(do_test_finished);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ function run_test() {
{
if (get_platform() == "WINNT") {
var status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT2D);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_NO_INFO);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);
} else if (get_platform() == "Darwin") {
status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_OPENGL_LAYERS);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_NO_INFO);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);
}

gTestserver.stop(do_test_finished);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ function run_test() {
function checkBlacklist()
{
var status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT2D);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_NO_INFO);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);

status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT3D_9_LAYERS);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_NO_INFO);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);

gTestserver.stop(do_test_finished);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function run_test() {

// Make sure unrelated features aren't affected
status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT3D_9_LAYERS);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_NO_INFO);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);

var prefs = Cc["@mozilla.org/preferences-service;1"].
getService(Ci.nsIPrefBranch);
Expand All @@ -108,11 +108,11 @@ function run_test() {
function ensureBlacklistUnset()
{
var status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT2D);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_NO_INFO);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);

// Make sure unrelated features aren't affected
status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT3D_9_LAYERS);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_NO_INFO);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);

var prefs = Cc["@mozilla.org/preferences-service;1"].
getService(Ci.nsIPrefBranch);
Expand Down
6 changes: 3 additions & 3 deletions widget/android/GfxInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ GfxInfo::GetGfxDriverInfo()
if (mDriverInfo->IsEmpty()) {
APPEND_TO_DRIVER_BLOCKLIST2( DRIVER_OS_ALL,
(nsAString&) GfxDriverInfo::GetDeviceVendor(VendorAll), GfxDriverInfo::allDevices,
nsIGfxInfo::FEATURE_OPENGL_LAYERS, nsIGfxInfo::FEATURE_NO_INFO,
nsIGfxInfo::FEATURE_OPENGL_LAYERS, nsIGfxInfo::FEATURE_STATUS_OK,
DRIVER_COMPARISON_IGNORED, GfxDriverInfo::allDriverVersions );
}

Expand All @@ -377,7 +377,7 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature,
// This early return is so we avoid potentially slow
// GLStrings initialization on startup when we initialize GL layers.
if (aFeature == nsIGfxInfo::FEATURE_OPENGL_LAYERS) {
*aStatus = nsIGfxInfo::FEATURE_NO_INFO;
*aStatus = nsIGfxInfo::FEATURE_STATUS_OK;
return NS_OK;
}

Expand Down Expand Up @@ -559,7 +559,7 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature,
CompareVersions(mOSVersion.get(), "4.4.2") >= 0 &&
cManufacturer.Equals("lge", nsCaseInsensitiveCStringComparator()) &&
cModel.Equals("nexus 5", nsCaseInsensitiveCStringComparator())) {
*aStatus = nsIGfxInfo::FEATURE_NO_INFO;
*aStatus = nsIGfxInfo::FEATURE_STATUS_OK;
return NS_OK;
} else {
// Blocklist all other devices except Nexus 5 which VP8 hardware acceleration is supported
Expand Down
2 changes: 1 addition & 1 deletion widget/cocoa/GfxInfo.mm
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ static uint32_t IntValueOfCFData(CFDataRef d)
if (mAdapterVendorID.Equals(GfxDriverInfo::GetDeviceVendor(VendorATI), nsCaseInsensitiveStringComparator()) &&
(mAdapterDeviceID.LowerCaseEqualsLiteral("0x6760") ||
mAdapterDeviceID.LowerCaseEqualsLiteral("0x9488"))) {
*aStatus = nsIGfxInfo::FEATURE_NO_INFO;
*aStatus = nsIGfxInfo::FEATURE_STATUS_OK;
return NS_OK;
}
}
Expand Down
2 changes: 1 addition & 1 deletion widget/gonk/GfxInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ GfxInfo::GetFeatureStatusImpl(int32_t /*aFeature*/,
OperatingSystem* /*aOS*/ /* = nullptr */)
{
NS_ENSURE_ARG_POINTER(aStatus);
*aStatus = nsIGfxInfo::FEATURE_NO_INFO;
*aStatus = nsIGfxInfo::FEATURE_STATUS_OK;

return NS_OK;
}
Expand Down
5 changes: 2 additions & 3 deletions widget/nsIGfxInfo.idl
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,8 @@ interface nsIGfxInfo : nsISupports
* A set of return values from GetFeatureStatus
*/

/* We don't explicitly block or discourage the feature. Which means we'll try getting it from the
* hardware, and see what happens. */
const long FEATURE_NO_INFO = 1;
/* The driver is save to the best of our knowledge */
const long FEATURE_STATUS_OK = 1;
/* We don't know the status of the feature yet. The analysis probably hasn't finished yet. */
const long FEATURE_STATUS_UNKNOWN = 2;
/* This feature is blocked on this driver version. Updating driver will typically unblock it. */
Expand Down
2 changes: 1 addition & 1 deletion widget/windows/GfxInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1030,7 +1030,7 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature,
adapterDeviceID.LowerCaseEqualsLiteral("0x0861") && // GeForce 9400
driverVersion == V(6,14,11,7756))
{
*aStatus = FEATURE_NO_INFO;
*aStatus = FEATURE_STATUS_OK;
return NS_OK;
}

Expand Down
2 changes: 1 addition & 1 deletion widget/windows/nsWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6777,7 +6777,7 @@ nsWindow::HasBogusPopupsDropShadowOnMultiMonitor() {
if (gfxInfo) {
int32_t status;
if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_DIRECT3D_9_LAYERS, &status))) {
if (status == nsIGfxInfo::FEATURE_NO_INFO || prefs.mForceAcceleration)
if (status == nsIGfxInfo::FEATURE_STATUS_OK || prefs.mForceAcceleration)
{
sHasBogusPopupsDropShadowOnMultiMonitor = TRI_TRUE;
}
Expand Down
2 changes: 1 addition & 1 deletion widget/xpwidgets/GfxDriverInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ GfxDriverInfo::GfxDriverInfo()
mDevices(allDevices),
mDeleteDevices(false),
mFeature(allFeatures),
mFeatureStatus(nsIGfxInfo::FEATURE_NO_INFO),
mFeatureStatus(nsIGfxInfo::FEATURE_STATUS_OK),
mComparisonOp(DRIVER_COMPARISON_IGNORED),
mDriverVersion(0),
mDriverVersionMax(0),
Expand Down
Loading

0 comments on commit cfa586e

Please sign in to comment.