gfx/src/gfxTelemetry.cpp
author Sebastian Hengst <archaeopteryx@coole-files.de>
Thu, 28 Apr 2016 10:32:25 +0200
changeset 295258 df82a308881223ce93397787ef45da2aa960737e
parent 295236 993906e53329b6eb88b3f0a26507cdae0ae17be0
child 295444 4dbe9e240867d9073d3e9a4529e15ed036f93852
permissions -rw-r--r--
Backed out 13 changesets (bug 1254899) for test failure in browser_Troubleshoot.js. r=backout Backed out changeset f749ee384012 (bug 1254899) Backed out changeset 1d7eeee5a5c5 (bug 1254899) Backed out changeset b5ab83af342c (bug 1254899) Backed out changeset 993906e53329 (bug 1254899) Backed out changeset e8abac801a51 (bug 1254899) Backed out changeset e9c311c68e4a (bug 1254899) Backed out changeset f8f3ae8c5cef (bug 1254899) Backed out changeset d17f98a9918a (bug 1254899) Backed out changeset 21c8a7ea2b93 (bug 1254899) Backed out changeset 64e58f9625eb (bug 1254899) Backed out changeset 2de214d5d1e0 (bug 1254899) Backed out changeset f2056259d227 (bug 1254899) Backed out changeset b805df0c8296 (bug 1254899)

/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "gfxTelemetry.h"

namespace mozilla {
namespace gfx {

const char*
FeatureStatusToString(FeatureStatus aStatus)
{
  switch (aStatus) {
    case FeatureStatus::Unused:
      return "unused";
    case FeatureStatus::Unavailable:
      return "unavailable";
    case FeatureStatus::Crashed:
      return "crashed";
    case FeatureStatus::Blocked:
      return "blocked";
    case FeatureStatus::Blacklisted:
      return "blacklisted";
    case FeatureStatus::Failed:
      return "failed";
    case FeatureStatus::Disabled:
      return "disabled";
    case FeatureStatus::Available:
      return "available";
    default:
      MOZ_ASSERT_UNREACHABLE("missing status case");
      return "unknown";
  }
}

bool
IsFeatureStatusFailure(FeatureStatus aStatus)
{
  return aStatus != FeatureStatus::Unused &&
         aStatus != FeatureStatus::Available;
}

} // namespace gfx
} // namespace mozilla