2010-08-13 15:43:35 +00:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
2012-05-21 11:12:37 +00:00
|
|
|
* 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/. */
|
2010-08-13 15:43:35 +00:00
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
2010-08-16 07:15:03 +00:00
|
|
|
/* NOTE: this interface is completely undesigned, not stable and likely to change */
|
2019-05-13 19:51:49 +00:00
|
|
|
[scriptable, builtinclass, uuid(1accd618-4c80-4703-9d29-ecf257d397c8)]
|
2010-08-13 15:43:35 +00:00
|
|
|
interface nsIGfxInfo : nsISupports
|
|
|
|
{
|
2010-10-02 03:55:19 +00:00
|
|
|
/*
|
|
|
|
* These are win32-specific
|
|
|
|
*/
|
2010-08-13 15:43:35 +00:00
|
|
|
readonly attribute boolean D2DEnabled;
|
2010-08-16 07:15:03 +00:00
|
|
|
readonly attribute boolean DWriteEnabled;
|
2020-06-25 17:22:20 +00:00
|
|
|
readonly attribute boolean EmbeddedInFirefoxReality;
|
2016-11-14 23:02:02 +00:00
|
|
|
readonly attribute boolean usingGPUProcess;
|
2020-02-13 15:51:32 +00:00
|
|
|
readonly attribute boolean hasBattery;
|
2018-09-06 08:02:43 +00:00
|
|
|
readonly attribute AString DWriteVersion;
|
|
|
|
readonly attribute AString cleartypeParameters;
|
2011-08-12 13:46:41 +00:00
|
|
|
|
2019-05-27 00:02:32 +00:00
|
|
|
/*
|
|
|
|
* These are non-Android linux-specific
|
|
|
|
*/
|
|
|
|
readonly attribute AString windowProtocol;
|
2020-02-10 14:21:30 +00:00
|
|
|
readonly attribute AString desktopEnvironment;
|
2019-05-27 00:02:32 +00:00
|
|
|
|
2016-09-12 23:23:28 +00:00
|
|
|
/*
|
|
|
|
* These are valid across all platforms.
|
|
|
|
*/
|
2018-09-06 08:02:43 +00:00
|
|
|
readonly attribute AString ContentBackend;
|
2017-03-22 19:20:00 +00:00
|
|
|
readonly attribute boolean WebRenderEnabled;
|
2017-07-03 22:39:16 +00:00
|
|
|
readonly attribute boolean isHeadless;
|
2018-01-23 21:52:13 +00:00
|
|
|
readonly attribute boolean UsesTiling;
|
2018-04-30 20:05:19 +00:00
|
|
|
readonly attribute boolean ContentUsesTiling;
|
2017-08-15 04:08:18 +00:00
|
|
|
readonly attribute boolean OffMainThreadPaintEnabled;
|
2018-01-23 21:52:13 +00:00
|
|
|
readonly attribute long OffMainThreadPaintWorkerCount;
|
2019-01-08 15:48:24 +00:00
|
|
|
readonly attribute unsigned long TargetFrameRate;
|
2016-09-12 23:23:28 +00:00
|
|
|
|
2016-07-29 02:43:33 +00:00
|
|
|
// XXX: Switch to a list of devices, rather than explicitly numbering them.
|
2011-08-12 13:46:41 +00:00
|
|
|
|
2010-08-27 15:49:02 +00:00
|
|
|
/**
|
|
|
|
* The name of the display adapter.
|
|
|
|
*/
|
2018-09-06 08:02:43 +00:00
|
|
|
readonly attribute AString adapterDescription;
|
|
|
|
readonly attribute AString adapterDescription2;
|
2010-08-27 15:49:02 +00:00
|
|
|
|
2018-09-06 08:02:43 +00:00
|
|
|
readonly attribute AString adapterDriver;
|
|
|
|
readonly attribute AString adapterDriver2;
|
2016-07-29 02:43:33 +00:00
|
|
|
|
2010-08-27 15:49:02 +00:00
|
|
|
/* These types are inspired by DXGI_ADAPTER_DESC */
|
2018-09-06 08:02:43 +00:00
|
|
|
readonly attribute AString adapterVendorID;
|
|
|
|
readonly attribute AString adapterVendorID2;
|
2016-07-29 02:43:33 +00:00
|
|
|
|
2018-09-06 08:02:43 +00:00
|
|
|
readonly attribute AString adapterDeviceID;
|
|
|
|
readonly attribute AString adapterDeviceID2;
|
2011-08-12 13:46:41 +00:00
|
|
|
|
2018-09-06 08:02:43 +00:00
|
|
|
readonly attribute AString adapterSubsysID;
|
|
|
|
readonly attribute AString adapterSubsysID2;
|
2014-07-09 18:21:49 +00:00
|
|
|
|
2010-08-27 15:49:02 +00:00
|
|
|
/**
|
|
|
|
* The amount of RAM in MB in the display adapter.
|
|
|
|
*/
|
2019-11-26 19:42:06 +00:00
|
|
|
readonly attribute unsigned long adapterRAM;
|
|
|
|
readonly attribute unsigned long adapterRAM2;
|
2016-07-29 02:43:33 +00:00
|
|
|
|
2019-04-30 20:29:18 +00:00
|
|
|
readonly attribute AString adapterDriverVendor;
|
|
|
|
readonly attribute AString adapterDriverVendor2;
|
|
|
|
|
2018-09-06 08:02:43 +00:00
|
|
|
readonly attribute AString adapterDriverVersion;
|
|
|
|
readonly attribute AString adapterDriverVersion2;
|
2016-07-29 02:43:33 +00:00
|
|
|
|
2018-09-06 08:02:43 +00:00
|
|
|
readonly attribute AString adapterDriverDate;
|
|
|
|
readonly attribute AString adapterDriverDate2;
|
2011-08-12 13:46:41 +00:00
|
|
|
|
|
|
|
readonly attribute boolean isGPU2Active;
|
2010-08-30 21:45:29 +00:00
|
|
|
|
2019-10-03 23:43:35 +00:00
|
|
|
/**
|
|
|
|
* Information about display devices
|
|
|
|
*/
|
|
|
|
readonly attribute Array<AString> displayInfo;
|
2019-11-26 19:42:06 +00:00
|
|
|
readonly attribute Array<unsigned long> displayWidth;
|
|
|
|
readonly attribute Array<unsigned long> displayHeight;
|
2019-10-03 23:43:35 +00:00
|
|
|
|
2015-07-13 08:12:26 +00:00
|
|
|
/**
|
|
|
|
* Returns an array of objects describing each monitor. Guaranteed properties
|
|
|
|
* are "screenWidth" and "screenHeight". This is only implemented on Desktop.
|
|
|
|
*
|
|
|
|
* Windows additionally supplies "refreshRate" and "pseudoDisplay".
|
|
|
|
*
|
|
|
|
* OS X additionally supplies "scale".
|
|
|
|
*/
|
|
|
|
[implicit_jscontext]
|
|
|
|
jsval getMonitors();
|
|
|
|
|
2019-06-07 20:13:56 +00:00
|
|
|
Array<ACString> getFailures(out Array<long> indices);
|
2011-02-07 19:44:48 +00:00
|
|
|
|
|
|
|
[noscript, notxpcom] void logFailure(in ACString failure);
|
2010-08-30 21:45:29 +00:00
|
|
|
/*
|
|
|
|
* A set of constants for features that we can ask this GfxInfo object
|
|
|
|
* about via GetFeatureStatus
|
|
|
|
*/
|
2015-05-15 14:42:11 +00:00
|
|
|
/* Don't assign any value <= 0 */
|
2020-09-27 22:18:23 +00:00
|
|
|
/* Values must be contiguous */
|
2010-08-30 21:45:29 +00:00
|
|
|
/* Whether Direct2D is supported for content rendering. */
|
|
|
|
const long FEATURE_DIRECT2D = 1;
|
|
|
|
/* Whether Direct3D 9 is supported for layers. */
|
|
|
|
const long FEATURE_DIRECT3D_9_LAYERS = 2;
|
|
|
|
/* Whether Direct3D 10.0 is supported for layers. */
|
|
|
|
const long FEATURE_DIRECT3D_10_LAYERS = 3;
|
|
|
|
/* Whether Direct3D 10.1 is supported for layers. */
|
|
|
|
const long FEATURE_DIRECT3D_10_1_LAYERS = 4;
|
|
|
|
/* Whether OpenGL is supported for layers */
|
|
|
|
const long FEATURE_OPENGL_LAYERS = 5;
|
|
|
|
/* Whether WebGL is supported via OpenGL. */
|
|
|
|
const long FEATURE_WEBGL_OPENGL = 6;
|
|
|
|
/* Whether WebGL is supported via ANGLE (D3D9 -- does not check for the presence of ANGLE libs). */
|
|
|
|
const long FEATURE_WEBGL_ANGLE = 7;
|
2020-09-27 22:18:23 +00:00
|
|
|
/* (Unused) Whether WebGL antialiasing is supported. */
|
|
|
|
const long UNUSED_FEATURE_WEBGL_MSAA = 8;
|
2015-05-15 14:42:11 +00:00
|
|
|
/* Whether Stagefright is supported, starting in 17. */
|
2012-11-01 21:13:10 +00:00
|
|
|
const long FEATURE_STAGEFRIGHT = 9;
|
2019-10-08 17:15:44 +00:00
|
|
|
/* Whether Webrtc Hardware H.264 acceleration is supported, starting in 71. */
|
|
|
|
const long FEATURE_WEBRTC_HW_ACCELERATION_H264 = 10;
|
2015-05-15 14:42:11 +00:00
|
|
|
/* Whether Direct3D 11 is supported for layers, starting in 32. */
|
2014-05-16 16:16:21 +00:00
|
|
|
const long FEATURE_DIRECT3D_11_LAYERS = 11;
|
2015-05-15 14:42:11 +00:00
|
|
|
/* Whether hardware accelerated video decoding is supported, starting in 36. */
|
2015-04-01 03:06:56 +00:00
|
|
|
const long FEATURE_HARDWARE_VIDEO_DECODING = 12;
|
2015-05-15 14:42:11 +00:00
|
|
|
/* Whether Direct3D 11 is supported for ANGLE, starting in 38. */
|
2015-04-10 20:17:27 +00:00
|
|
|
const long FEATURE_DIRECT3D_11_ANGLE = 13;
|
2015-07-24 19:45:55 +00:00
|
|
|
/* Whether Webrtc Hardware acceleration is supported, starting in 42. */
|
|
|
|
const long FEATURE_WEBRTC_HW_ACCELERATION_ENCODE = 14;
|
|
|
|
/* Whether Webrtc Hardware acceleration is supported, starting in 42. */
|
|
|
|
const long FEATURE_WEBRTC_HW_ACCELERATION_DECODE = 15;
|
2016-02-19 13:39:00 +00:00
|
|
|
/* Whether Canvas acceleration is supported, starting in 45 */
|
|
|
|
const long FEATURE_CANVAS2D_ACCELERATION = 16;
|
2017-11-21 18:13:10 +00:00
|
|
|
/* Whether hardware VP8 decoding is supported, starting in 48; not for downloadable blocking. */
|
2016-03-21 19:19:13 +00:00
|
|
|
const long FEATURE_VP8_HW_DECODE = 17;
|
2017-11-21 18:13:10 +00:00
|
|
|
/* Whether hardware VP9 decoding is supported, starting in 48; not for downloadable blocking. */
|
2016-03-21 19:19:13 +00:00
|
|
|
const long FEATURE_VP9_HW_DECODE = 18;
|
2017-11-21 18:13:10 +00:00
|
|
|
/* Whether NV_dx_interop2 is supported, starting in 50; downloadable blocking in 58. */
|
2016-07-29 02:42:05 +00:00
|
|
|
const long FEATURE_DX_INTEROP2 = 19;
|
2017-11-21 18:13:10 +00:00
|
|
|
/* Whether the GPU process is supported, starting in 52; downloadable blocking in 58. */
|
2016-10-27 15:04:50 +00:00
|
|
|
const long FEATURE_GPU_PROCESS = 20;
|
2017-03-02 20:48:06 +00:00
|
|
|
/* Whether the WebGL2 is supported, starting in 54 */
|
|
|
|
const long FEATURE_WEBGL2 = 21;
|
2017-06-23 21:23:13 +00:00
|
|
|
/* Whether Advanced Layers is supported, starting in 56 */
|
|
|
|
const long FEATURE_ADVANCED_LAYERS = 22;
|
2017-07-25 18:02:36 +00:00
|
|
|
/* Whether D3D11 keyed mutex is supported, starting in 56 */
|
|
|
|
const long FEATURE_D3D11_KEYED_MUTEX = 23;
|
2018-05-03 10:02:00 +00:00
|
|
|
/* Whether WebRender is supported, starting in 62 */
|
|
|
|
const long FEATURE_WEBRENDER = 24;
|
2018-05-17 03:07:20 +00:00
|
|
|
/* Whether WebRender is supported, starting in 62 */
|
|
|
|
const long FEATURE_DX_NV12 = 25;
|
2018-10-11 07:32:35 +00:00
|
|
|
const long FEATURE_DX_P010 = 26;
|
|
|
|
const long FEATURE_DX_P016 = 27;
|
2019-08-09 18:57:35 +00:00
|
|
|
/* Whether OpenGL swizzle configuration of texture units is supported, starting in 70 */
|
|
|
|
const long FEATURE_GL_SWIZZLE = 28;
|
2019-12-10 19:16:13 +00:00
|
|
|
/* Whether WebRender native compositor is supported, starting in 73 */
|
|
|
|
const long FEATURE_WEBRENDER_COMPOSITOR = 29;
|
2020-06-08 21:05:03 +00:00
|
|
|
/* Whether WebRender can use scissored clears for cached surfaces, staring in 79 */
|
|
|
|
const long FEATURE_WEBRENDER_SCISSORED_CACHE_CLEARS = 30;
|
2017-01-17 04:05:46 +00:00
|
|
|
/* the maximum feature value. */
|
2020-06-08 21:05:03 +00:00
|
|
|
const long FEATURE_MAX_VALUE = FEATURE_WEBRENDER_SCISSORED_CACHE_CLEARS;
|
2010-08-30 21:45:29 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* A set of return values from GetFeatureStatus
|
|
|
|
*/
|
2011-12-15 05:02:59 +00:00
|
|
|
|
2015-05-15 17:43:38 +00:00
|
|
|
/* The driver is safe to the best of our knowledge */
|
2014-07-01 21:44:09 +00:00
|
|
|
const long FEATURE_STATUS_OK = 1;
|
2011-12-15 05:02:59 +00:00
|
|
|
/* We don't know the status of the feature yet. The analysis probably hasn't finished yet. */
|
|
|
|
const long FEATURE_STATUS_UNKNOWN = 2;
|
2010-10-07 04:40:08 +00:00
|
|
|
/* This feature is blocked on this driver version. Updating driver will typically unblock it. */
|
2011-12-15 05:02:59 +00:00
|
|
|
const long FEATURE_BLOCKED_DRIVER_VERSION = 3;
|
2010-10-07 04:40:08 +00:00
|
|
|
/* This feature is blocked on this device, regardless of driver version.
|
|
|
|
* Typically means we hit too many driver crashes without a good reason to hope for them to
|
|
|
|
* get fixed soon. */
|
2011-12-15 05:02:59 +00:00
|
|
|
const long FEATURE_BLOCKED_DEVICE = 4;
|
2010-08-30 21:45:29 +00:00
|
|
|
/* This feature is available and can be used, but is not suggested (e.g. shouldn't be used by default */
|
2011-12-15 05:02:59 +00:00
|
|
|
const long FEATURE_DISCOURAGED = 5;
|
2010-10-12 21:27:14 +00:00
|
|
|
/* This feature is blocked on this OS version. */
|
2011-12-15 05:02:59 +00:00
|
|
|
const long FEATURE_BLOCKED_OS_VERSION = 6;
|
2015-05-15 17:43:38 +00:00
|
|
|
/* This feature is blocked because of mismatched driver versions. */
|
|
|
|
const long FEATURE_BLOCKED_MISMATCHED_VERSION = 7;
|
2020-02-13 16:06:41 +00:00
|
|
|
/* This feature is blocked due to not being on the allowlist. */
|
|
|
|
const long FEATURE_DENIED = 8;
|
|
|
|
/* This feature is safe to be on this device due to the allowlist. */
|
|
|
|
const long FEATURE_ALLOW_ALWAYS = 9;
|
|
|
|
/* This feature is safe to be on this device due to the allowlist, depending on qualified/experiment status. */
|
|
|
|
const long FEATURE_ALLOW_QUALIFIED = 10;
|
2010-08-30 21:45:29 +00:00
|
|
|
|
|
|
|
/**
|
2016-04-13 21:12:47 +00:00
|
|
|
* Ask about a feature, and return the status of that feature.
|
|
|
|
* If the feature is not ok then aFailureId will give a unique failure Id
|
|
|
|
* otherwise it will be empty.
|
2010-08-30 21:45:29 +00:00
|
|
|
*/
|
2016-04-13 21:12:47 +00:00
|
|
|
long getFeatureStatus(in long aFeature, [optional] out ACString aFailureId);
|
2010-10-07 04:40:08 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Ask about a feature, return the minimum driver version required for it if its status is
|
2016-07-29 02:43:33 +00:00
|
|
|
* FEATURE_BLOCKED_DRIVER_VERSION, otherwise return an empty string.
|
2010-10-07 04:40:08 +00:00
|
|
|
*/
|
2018-09-06 08:02:43 +00:00
|
|
|
AString getFeatureSuggestedDriverVersion(in long aFeature);
|
2010-12-16 20:49:54 +00:00
|
|
|
|
2011-09-07 21:17:44 +00:00
|
|
|
// only useful on X11
|
|
|
|
[noscript, notxpcom] void GetData();
|
2011-11-02 20:53:59 +00:00
|
|
|
|
2020-05-15 08:39:43 +00:00
|
|
|
/**
|
|
|
|
* Maximum refresh rate among detected monitors. -1 if unknown.
|
|
|
|
*/
|
|
|
|
[noscript, notxpcom] long GetMaxRefreshRate();
|
|
|
|
|
2011-11-02 20:53:59 +00:00
|
|
|
[implicit_jscontext]
|
|
|
|
jsval getInfo();
|
2015-07-19 21:50:35 +00:00
|
|
|
|
2016-04-29 04:52:56 +00:00
|
|
|
// Return an object describing all features that have been configured:
|
|
|
|
//
|
|
|
|
// "features": [
|
|
|
|
// // For each feature:
|
|
|
|
// {
|
|
|
|
// "name": <string>,
|
|
|
|
// "description": <string>,
|
|
|
|
// "status": <string>,
|
|
|
|
// "log": [
|
|
|
|
// // One or more log entries, the first denotes the default value.
|
|
|
|
// {
|
|
|
|
// "type": <string>, // "base", "user", "env", or "runtime"
|
|
|
|
// "status": <string>,
|
|
|
|
// "message": <string> // Set unless type is "base" and status is "available".
|
|
|
|
// }
|
|
|
|
// ]
|
|
|
|
// }
|
|
|
|
// ]
|
|
|
|
// "fallbacks": [
|
|
|
|
// // For each workaround:
|
|
|
|
// {
|
|
|
|
// "name:" <string>,
|
|
|
|
// "description": <string>,
|
|
|
|
// "message": <string>
|
|
|
|
// ]
|
|
|
|
// }
|
2016-05-05 18:42:12 +00:00
|
|
|
//
|
|
|
|
// When a message is prefixed with a '#', it is a special status code. Status
|
|
|
|
// codes are unique identifiers that can be searched in the codebase to find
|
|
|
|
// which line of code caused the message. Some codes are standardized to
|
|
|
|
// improve about:support messaging:
|
|
|
|
//
|
|
|
|
// "[CONTEXT_]FEATURE_FAILURE_BUG_<number>"
|
|
|
|
// CONTEXT is optional and can currently only be "BLOCKLIST".
|
|
|
|
// <number> refers to a bug number in Bugzilla.
|
|
|
|
//
|
2016-04-29 04:52:56 +00:00
|
|
|
[implicit_jscontext]
|
|
|
|
jsval getFeatureLog();
|
|
|
|
|
2015-07-19 21:50:35 +00:00
|
|
|
// Returns an object containing information about graphics features. It is
|
|
|
|
// intended to be directly included into the Telemetry environment.
|
|
|
|
//
|
|
|
|
// "layers":
|
|
|
|
// {
|
|
|
|
// "compositor": "d3d9", "d3d11", "opengl", "basic", or "none"
|
|
|
|
// // ("none" indicates no compositors have been created)
|
|
|
|
// // Feature is one of "d3d9", "d3d11", "opengl", "basic", or "d2d".
|
|
|
|
// "<feature>": {
|
|
|
|
// // Each backend can have one of the following statuses:
|
|
|
|
// // "unused" - This feature has not been requested.
|
|
|
|
// // "unavailable" - OS version or restriction prevents use.
|
|
|
|
// // "blocked" - An internal condition (such as safe mode) prevents use.
|
2020-06-23 15:14:24 +00:00
|
|
|
// // "blocklisted" - Blocked due to a blocklist restriction.
|
2020-02-13 16:06:41 +00:00
|
|
|
// // "denied" - Blocked due to allowlist restrictions.
|
2015-07-19 21:50:35 +00:00
|
|
|
// // "disabled" - User explicitly disabled this default feature.
|
|
|
|
// // "failed" - Feature failed to initialize.
|
|
|
|
// // "available" - User has this feature available by default.
|
|
|
|
// "status": "<status>",
|
|
|
|
// "version": "<version>",
|
|
|
|
// "warp": true|false, // D3D11 only.
|
|
|
|
// "textureSharing": true|false, // D3D11 only.
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
[implicit_jscontext]
|
|
|
|
jsval getFeatures();
|
2016-05-10 18:49:16 +00:00
|
|
|
|
|
|
|
// Returns an array listing any active crash guards.
|
|
|
|
//
|
|
|
|
// [
|
|
|
|
// {
|
|
|
|
// // Type is one of "d3d11layers", "d3d9video", "glcontext",
|
|
|
|
// // or "d3d11video".
|
|
|
|
// "type": "<identifier>",
|
|
|
|
//
|
|
|
|
// // Preference that must be deleted/reset to retrigger the guard.
|
|
|
|
// "prefName": "<preference>",
|
|
|
|
// }
|
|
|
|
// ]
|
|
|
|
[implicit_jscontext]
|
|
|
|
jsval getActiveCrashGuards();
|
2017-01-27 00:35:55 +00:00
|
|
|
|
|
|
|
// Forces the GPU process to start or shutdown. This is intended only for
|
|
|
|
// xpcshell-tests.
|
|
|
|
boolean controlGPUProcessForXPCShell(in boolean aEnable);
|
2010-08-13 15:43:35 +00:00
|
|
|
};
|
|
|
|
|
2019-11-26 19:42:06 +00:00
|
|
|
|