Bug 1857841 - pt 3. Add a new page kind named "fresh" r=glandium
[gecko.git] / gfx / src / gfxTelemetry.h
blob37d603674a9ee526a2ba8cfd5b611f635eebb8bf
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__
9 #include <cstdint>
11 namespace mozilla {
12 namespace gfx {
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
16 // (and if not, why).
17 enum class FeatureStatus {
18 // This feature has not been requested.
19 Unused,
21 // This feature is unavailable due to Safe Mode, not being included with
22 // the operating system, or a dependent feature being disabled.
23 Unavailable,
24 UnavailableInSafeMode,
25 UnavailableNoGpuProcess,
26 UnavailableNoHwCompositing,
27 UnavailableNotBuilt,
28 UnavailableNoAngle,
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).
33 CrashedInHandler,
35 // This feature was blocked for reasons outside the blocklist, such as a
36 // runtime test failing.
37 Blocked,
38 BlockedDeviceUnknown,
39 BlockedDeviceTooOld,
40 BlockedVendorUnsupported,
41 BlockedHasBattery,
42 BlockedScreenTooLarge,
43 BlockedScreenUnknown,
44 BlockedNoGfxInfo,
45 BlockedOverride,
46 BlockedReleaseChannelIntel,
47 BlockedReleaseChannelAMD,
48 BlockedReleaseChannelNvidia,
49 BlockedReleaseChannelBattery,
50 BlockedReleaseChannelAndroid,
52 // This feature has been blocked by the allowlist.
53 Denied,
55 // This feature has been blocked by the graphics blocklist.
56 Blocklisted,
58 // This feature is disabled by default, and so activation isn't attempted
59 // unless something explicitly enables it.
60 OptIn,
62 // This feature was attempted but failed to activate.
63 Failed,
65 // This feature was explicitly disabled by the user.
66 Disabled,
68 // This feature is available for use.
69 Available,
71 // This feature was explicitly force-enabled by the user.
72 ForceEnabled,
74 // This feature was disabled due to the startup crash guard.
75 CrashedOnStartup,
77 // This feature was attempted but later determined to be broken.
78 Broken,
80 // Add new entries above here.
81 LAST
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 };
90 } // namespace gfx
91 } // namespace mozilla
93 #endif // gfx_src_gfxTelemetry_h__