1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef gfx_src_gfxTelemetry_h__
7 #define gfx_src_gfxTelemetry_h__
14 // Describes the status of a graphics feature, in terms of whether or not we've
15 // attempted to initialize the feature, and if so, whether or not it succeeded
17 enum class FeatureStatus
{
18 // This feature has not been requested.
21 // This feature is unavailable due to Safe Mode, not being included with
22 // the operating system, or a dependent feature being disabled.
24 UnavailableInSafeMode
,
25 UnavailableNoGpuProcess
,
26 UnavailableNoHwCompositing
,
29 UnavailableNoWebRender
,
31 // This feature crashed immediately when we tried to initialize it, but we
32 // were able to recover via SEH (or something similar).
35 // This feature was blocked for reasons outside the blocklist, such as a
36 // runtime test failing.
40 BlockedVendorUnsupported
,
42 BlockedScreenTooLarge
,
46 BlockedReleaseChannelIntel
,
47 BlockedReleaseChannelAMD
,
48 BlockedReleaseChannelNvidia
,
49 BlockedReleaseChannelBattery
,
50 BlockedReleaseChannelAndroid
,
52 // This feature has been blocked by the allowlist.
55 // This feature has been blocked by the graphics blocklist.
58 // This feature is disabled by default, and so activation isn't attempted
59 // unless something explicitly enables it.
62 // This feature was attempted but failed to activate.
65 // This feature was explicitly disabled by the user.
68 // This feature is available for use.
71 // This feature was explicitly force-enabled by the user.
74 // This feature was disabled due to the startup crash guard.
77 // This feature was attempted but later determined to be broken.
80 // Add new entries above here.
84 const char* FeatureStatusToString(FeatureStatus aStatus
);
85 bool IsFeatureStatusFailure(FeatureStatus aStatus
);
86 bool IsFeatureStatusSuccess(FeatureStatus aStatus
);
88 enum class TelemetryDeviceCode
: uint32_t { Content
= 0, Image
= 1, D2D1
= 2 };
91 } // namespace mozilla
93 #endif // gfx_src_gfxTelemetry_h__