widget/nsIGfxInfo.idl

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
     2  *
     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/. */
     7 #include "nsISupports.idl"
     9 /* NOTE: this interface is completely undesigned, not stable and likely to change */
    11 [scriptable, uuid(1194ba76-aeb5-48df-abfd-844740ce3696)]
    12 interface nsIGfxInfo : nsISupports
    13 {
    14   /*
    15    * These are win32-specific
    16    */
    17   readonly attribute boolean D2DEnabled;
    18   readonly attribute boolean DWriteEnabled;
    19   readonly attribute DOMString DWriteVersion;
    20   readonly attribute DOMString cleartypeParameters;
    22   // XXX: Switch to a list of devices, rather than explicitly numbering them. 
    24   /**
    25    * The name of the display adapter.
    26    */
    27   readonly attribute DOMString adapterDescription;
    28   readonly attribute DOMString adapterDescription2;
    30   readonly attribute DOMString adapterDriver;
    31   readonly attribute DOMString adapterDriver2;
    33   /* These types are inspired by DXGI_ADAPTER_DESC */
    34   readonly attribute DOMString adapterVendorID;
    35   readonly attribute DOMString adapterVendorID2;
    37   readonly attribute DOMString adapterDeviceID;
    38   readonly attribute DOMString adapterDeviceID2;
    40   /**
    41    * The amount of RAM in MB in the display adapter.
    42    */
    43   readonly attribute DOMString adapterRAM;
    44   readonly attribute DOMString adapterRAM2;
    46   readonly attribute DOMString adapterDriverVersion;
    47   readonly attribute DOMString adapterDriverVersion2;
    49   readonly attribute DOMString adapterDriverDate;
    50   readonly attribute DOMString adapterDriverDate2;
    52   readonly attribute boolean isGPU2Active;
    54   void getFailures(
    55                [optional] out unsigned long failureCount,
    56                [retval, array, size_is(failureCount)] out string failures);
    58   [noscript, notxpcom] void logFailure(in ACString failure);
    59   /*
    60    * A set of constants for features that we can ask this GfxInfo object
    61    * about via GetFeatureStatus
    62    */
    63   /* Don't assign 0 or -1 */
    64   /* Whether Direct2D is supported for content rendering. */
    65   const long FEATURE_DIRECT2D = 1;
    66   /* Whether Direct3D 9 is supported for layers. */
    67   const long FEATURE_DIRECT3D_9_LAYERS = 2;
    68   /* Whether Direct3D 10.0 is supported for layers. */
    69   const long FEATURE_DIRECT3D_10_LAYERS = 3;
    70   /* Whether Direct3D 10.1 is supported for layers. */
    71   const long FEATURE_DIRECT3D_10_1_LAYERS = 4;
    72   /* Whether OpenGL is supported for layers */
    73   const long FEATURE_OPENGL_LAYERS = 5;
    74   /* Whether WebGL is supported via OpenGL. */
    75   const long FEATURE_WEBGL_OPENGL = 6;
    76   /* Whether WebGL is supported via ANGLE (D3D9 -- does not check for the presence of ANGLE libs). */
    77   const long FEATURE_WEBGL_ANGLE = 7;
    78   /* Whether WebGL antialiasing is supported. */
    79   const long FEATURE_WEBGL_MSAA = 8;
    80   /* Whether Stagefright is supported */
    81   const long FEATURE_STAGEFRIGHT = 9;
    82   /* Whether Webrtc Hardware acceleration is supported */
    83   const long FEATURE_WEBRTC_HW_ACCELERATION = 10;
    85   /*
    86    * A set of return values from GetFeatureStatus
    87    */
    89   /* We don't explicitly block or discourage the feature. Which means we'll try getting it from the
    90    * hardware, and see what happens. */
    91   const long FEATURE_NO_INFO = 1;
    92   /* We don't know the status of the feature yet. The analysis probably hasn't finished yet. */
    93   const long FEATURE_STATUS_UNKNOWN = 2;
    94   /* This feature is blocked on this driver version. Updating driver will typically unblock it. */
    95   const long FEATURE_BLOCKED_DRIVER_VERSION = 3;
    96   /* This feature is blocked on this device, regardless of driver version.
    97    * Typically means we hit too many driver crashes without a good reason to hope for them to
    98    * get fixed soon. */
    99   const long FEATURE_BLOCKED_DEVICE = 4;
   100   /* This feature is available and can be used, but is not suggested (e.g. shouldn't be used by default */
   101   const long FEATURE_DISCOURAGED = 5;
   102   /* This feature is blocked on this OS version. */
   103   const long FEATURE_BLOCKED_OS_VERSION = 6;
   105   /**
   106    * Ask about a feature, and return the status of that feature
   107    */
   108   long getFeatureStatus(in long aFeature);
   110   /*
   111    * Ask about a feature, return the minimum driver version required for it if its status is
   112    * FEATURE_BLOCKED_DRIVER_VERSION, otherwise return an empty string. 
   113    */
   114   DOMString getFeatureSuggestedDriverVersion(in long aFeature);
   116   /**
   117    * WebGL info; valid params are "full-renderer", "vendor", "renderer", "version",
   118    * "shading_language_version", "extensions".  These return info from
   119    * underlying GL impl that's used to implement WebGL.
   120    */
   121   DOMString getWebGLParameter(in DOMString aParam);
   123   // only useful on X11
   124   [noscript, notxpcom] void GetData();
   126   [implicit_jscontext]
   127   jsval getInfo();
   128 };

mercurial