2010-08-13 08:43:35 -07:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
2012-05-21 04:12:37 -07: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 08:43:35 -07:00
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
2010-08-16 00:15:03 -07:00
|
|
|
/* NOTE: this interface is completely undesigned, not stable and likely to change */
|
|
|
|
|
2015-07-24 12:45:55 -07:00
|
|
|
[scriptable, uuid(4b5ea59e-af89-44f7-8c1c-2dea47a170d1)]
|
2010-08-13 08:43:35 -07:00
|
|
|
interface nsIGfxInfo : nsISupports
|
|
|
|
{
|
2010-10-01 20:55:19 -07:00
|
|
|
/*
|
|
|
|
* These are win32-specific
|
|
|
|
*/
|
2010-08-13 08:43:35 -07:00
|
|
|
readonly attribute boolean D2DEnabled;
|
2010-08-16 00:15:03 -07:00
|
|
|
readonly attribute boolean DWriteEnabled;
|
2011-01-14 04:57:17 -08:00
|
|
|
readonly attribute DOMString DWriteVersion;
|
2011-05-10 17:30:20 -07:00
|
|
|
readonly attribute DOMString cleartypeParameters;
|
2011-08-12 06:46:41 -07:00
|
|
|
|
|
|
|
// XXX: Switch to a list of devices, rather than explicitly numbering them.
|
|
|
|
|
2010-08-27 08:49:02 -07:00
|
|
|
/**
|
|
|
|
* The name of the display adapter.
|
|
|
|
*/
|
|
|
|
readonly attribute DOMString adapterDescription;
|
2011-08-12 06:46:41 -07:00
|
|
|
readonly attribute DOMString adapterDescription2;
|
2010-08-27 08:49:02 -07:00
|
|
|
|
|
|
|
readonly attribute DOMString adapterDriver;
|
2011-08-12 06:46:41 -07:00
|
|
|
readonly attribute DOMString adapterDriver2;
|
2010-08-27 08:49:02 -07:00
|
|
|
|
|
|
|
/* These types are inspired by DXGI_ADAPTER_DESC */
|
2011-12-14 21:03:01 -08:00
|
|
|
readonly attribute DOMString adapterVendorID;
|
|
|
|
readonly attribute DOMString adapterVendorID2;
|
2010-08-27 08:49:02 -07:00
|
|
|
|
2011-12-14 21:03:01 -08:00
|
|
|
readonly attribute DOMString adapterDeviceID;
|
|
|
|
readonly attribute DOMString adapterDeviceID2;
|
2011-08-12 06:46:41 -07:00
|
|
|
|
2014-07-09 11:21:49 -07:00
|
|
|
readonly attribute DOMString adapterSubsysID;
|
|
|
|
readonly attribute DOMString adapterSubsysID2;
|
|
|
|
|
2010-08-27 08:49:02 -07:00
|
|
|
/**
|
|
|
|
* The amount of RAM in MB in the display adapter.
|
|
|
|
*/
|
|
|
|
readonly attribute DOMString adapterRAM;
|
2011-08-12 06:46:41 -07:00
|
|
|
readonly attribute DOMString adapterRAM2;
|
2010-08-27 08:49:02 -07:00
|
|
|
|
|
|
|
readonly attribute DOMString adapterDriverVersion;
|
2011-08-12 06:46:41 -07:00
|
|
|
readonly attribute DOMString adapterDriverVersion2;
|
2010-08-27 08:49:02 -07:00
|
|
|
|
|
|
|
readonly attribute DOMString adapterDriverDate;
|
2011-08-12 06:46:41 -07:00
|
|
|
readonly attribute DOMString adapterDriverDate2;
|
|
|
|
|
|
|
|
readonly attribute boolean isGPU2Active;
|
2010-08-30 14:45:29 -07:00
|
|
|
|
2015-07-13 01:12:26 -07: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();
|
|
|
|
|
2011-02-07 11:44:48 -08:00
|
|
|
void getFailures(
|
2015-01-13 18:19:25 -08:00
|
|
|
out unsigned long failureCount,
|
|
|
|
[optional, array, size_is(failureCount)] out long indices,
|
2011-02-07 11:44:48 -08:00
|
|
|
[retval, array, size_is(failureCount)] out string failures);
|
|
|
|
|
|
|
|
[noscript, notxpcom] void logFailure(in ACString failure);
|
2010-08-30 14:45:29 -07:00
|
|
|
/*
|
|
|
|
* A set of constants for features that we can ask this GfxInfo object
|
|
|
|
* about via GetFeatureStatus
|
|
|
|
*/
|
2015-05-15 07:42:11 -07:00
|
|
|
/* Don't assign any value <= 0 */
|
2010-08-30 14:45:29 -07: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;
|
2011-11-03 07:50:40 -07:00
|
|
|
/* Whether WebGL antialiasing is supported. */
|
|
|
|
const long FEATURE_WEBGL_MSAA = 8;
|
2015-05-15 07:42:11 -07:00
|
|
|
/* Whether Stagefright is supported, starting in 17. */
|
2012-11-01 14:13:10 -07:00
|
|
|
const long FEATURE_STAGEFRIGHT = 9;
|
2015-05-15 07:42:11 -07:00
|
|
|
/* Whether Webrtc Hardware acceleration is supported, starting in 31. */
|
2014-03-20 06:37:16 -07:00
|
|
|
const long FEATURE_WEBRTC_HW_ACCELERATION = 10;
|
2015-05-15 07:42:11 -07:00
|
|
|
/* Whether Direct3D 11 is supported for layers, starting in 32. */
|
2014-05-16 09:16:21 -07:00
|
|
|
const long FEATURE_DIRECT3D_11_LAYERS = 11;
|
2015-05-15 07:42:11 -07:00
|
|
|
/* Whether hardware accelerated video decoding is supported, starting in 36. */
|
2015-03-31 20:06:56 -07:00
|
|
|
const long FEATURE_HARDWARE_VIDEO_DECODING = 12;
|
2015-05-15 07:42:11 -07:00
|
|
|
/* Whether Direct3D 11 is supported for ANGLE, starting in 38. */
|
2015-04-10 13:17:27 -07:00
|
|
|
const long FEATURE_DIRECT3D_11_ANGLE = 13;
|
2015-07-24 12:45:55 -07: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 05:39:00 -08:00
|
|
|
/* Whether Canvas acceleration is supported, starting in 45 */
|
|
|
|
const long FEATURE_CANVAS2D_ACCELERATION = 16;
|
2010-08-30 14:45:29 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* A set of return values from GetFeatureStatus
|
|
|
|
*/
|
2011-12-14 21:02:59 -08:00
|
|
|
|
2015-05-15 10:43:38 -07:00
|
|
|
/* The driver is safe to the best of our knowledge */
|
2014-07-01 14:44:09 -07:00
|
|
|
const long FEATURE_STATUS_OK = 1;
|
2011-12-14 21:02:59 -08: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-06 21:40:08 -07:00
|
|
|
/* This feature is blocked on this driver version. Updating driver will typically unblock it. */
|
2011-12-14 21:02:59 -08:00
|
|
|
const long FEATURE_BLOCKED_DRIVER_VERSION = 3;
|
2010-10-06 21:40:08 -07: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-14 21:02:59 -08:00
|
|
|
const long FEATURE_BLOCKED_DEVICE = 4;
|
2010-08-30 14:45:29 -07:00
|
|
|
/* This feature is available and can be used, but is not suggested (e.g. shouldn't be used by default */
|
2011-12-14 21:02:59 -08:00
|
|
|
const long FEATURE_DISCOURAGED = 5;
|
2010-10-12 14:27:14 -07:00
|
|
|
/* This feature is blocked on this OS version. */
|
2011-12-14 21:02:59 -08:00
|
|
|
const long FEATURE_BLOCKED_OS_VERSION = 6;
|
2015-05-15 10:43:38 -07:00
|
|
|
/* This feature is blocked because of mismatched driver versions. */
|
|
|
|
const long FEATURE_BLOCKED_MISMATCHED_VERSION = 7;
|
2010-08-30 14:45:29 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Ask about a feature, and return the status of that feature
|
|
|
|
*/
|
|
|
|
long getFeatureStatus(in long aFeature);
|
2010-10-06 21:40:08 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Ask about a feature, return the minimum driver version required for it if its status is
|
|
|
|
* FEATURE_BLOCKED_DRIVER_VERSION, otherwise return an empty string.
|
|
|
|
*/
|
|
|
|
DOMString getFeatureSuggestedDriverVersion(in long aFeature);
|
2010-12-16 12:49:54 -08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* WebGL info; valid params are "full-renderer", "vendor", "renderer", "version",
|
|
|
|
* "shading_language_version", "extensions". These return info from
|
|
|
|
* underlying GL impl that's used to implement WebGL.
|
|
|
|
*/
|
|
|
|
DOMString getWebGLParameter(in DOMString aParam);
|
2011-09-07 14:17:44 -07:00
|
|
|
|
|
|
|
// only useful on X11
|
|
|
|
[noscript, notxpcom] void GetData();
|
2011-11-02 13:53:59 -07:00
|
|
|
|
|
|
|
[implicit_jscontext]
|
|
|
|
jsval getInfo();
|
2015-07-19 14:50:35 -07: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.
|
|
|
|
// // "blacklisted" - Blocked due to a blacklist restriction.
|
|
|
|
// // "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();
|
2010-08-13 08:43:35 -07:00
|
|
|
};
|
|
|
|
|