widget/cocoa/GfxInfo.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* vim: se cin sw=2 ts=2 et : */
     2 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
     3  *
     4  * This Source Code Form is subject to the terms of the Mozilla Public
     5  * License, v. 2.0. If a copy of the MPL was not distributed with this
     6  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     8 #ifndef __mozilla_widget_GfxInfo_h__
     9 #define __mozilla_widget_GfxInfo_h__
    11 #include "GfxInfoBase.h"
    13 #include "nsString.h"
    15 namespace mozilla {
    16 namespace widget {
    18 class GfxInfo : public GfxInfoBase
    19 {
    20 public:
    22   GfxInfo();
    23   // We only declare the subset of nsIGfxInfo that we actually implement. The
    24   // rest is brought forward from GfxInfoBase.
    25   NS_IMETHOD GetD2DEnabled(bool *aD2DEnabled);
    26   NS_IMETHOD GetDWriteEnabled(bool *aDWriteEnabled);
    27   NS_IMETHOD GetDWriteVersion(nsAString & aDwriteVersion);
    28   NS_IMETHOD GetCleartypeParameters(nsAString & aCleartypeParams);
    29   NS_IMETHOD GetAdapterDescription(nsAString & aAdapterDescription);
    30   NS_IMETHOD GetAdapterDriver(nsAString & aAdapterDriver);
    31   NS_IMETHOD GetAdapterVendorID(nsAString & aAdapterVendorID);
    32   NS_IMETHOD GetAdapterDeviceID(nsAString & aAdapterDeviceID);
    33   NS_IMETHOD GetAdapterRAM(nsAString & aAdapterRAM);
    34   NS_IMETHOD GetAdapterDriverVersion(nsAString & aAdapterDriverVersion);
    35   NS_IMETHOD GetAdapterDriverDate(nsAString & aAdapterDriverDate);
    36   NS_IMETHOD GetAdapterDescription2(nsAString & aAdapterDescription);
    37   NS_IMETHOD GetAdapterDriver2(nsAString & aAdapterDriver);
    38   NS_IMETHOD GetAdapterVendorID2(nsAString & aAdapterVendorID);
    39   NS_IMETHOD GetAdapterDeviceID2(nsAString & aAdapterDeviceID);
    40   NS_IMETHOD GetAdapterRAM2(nsAString & aAdapterRAM);
    41   NS_IMETHOD GetAdapterDriverVersion2(nsAString & aAdapterDriverVersion);
    42   NS_IMETHOD GetAdapterDriverDate2(nsAString & aAdapterDriverDate);
    43   NS_IMETHOD GetIsGPU2Active(bool *aIsGPU2Active);
    45   using GfxInfoBase::GetFeatureStatus;
    46   using GfxInfoBase::GetFeatureSuggestedDriverVersion;
    47   using GfxInfoBase::GetWebGLParameter;
    49   virtual nsresult Init();
    51 #ifdef DEBUG
    52   NS_DECL_ISUPPORTS_INHERITED
    53   NS_DECL_NSIGFXINFODEBUG
    54 #endif
    56   virtual uint32_t OperatingSystemVersion() MOZ_OVERRIDE { return mOSXVersion; }
    58 protected:
    60   virtual nsresult GetFeatureStatusImpl(int32_t aFeature, 
    61                                         int32_t *aStatus, 
    62                                         nsAString & aSuggestedDriverVersion, 
    63                                         const nsTArray<GfxDriverInfo>& aDriverInfo,
    64                                         OperatingSystem* aOS = nullptr);
    65   virtual const nsTArray<GfxDriverInfo>& GetGfxDriverInfo();
    67 private:
    69   void GetDeviceInfo();
    70   void AddCrashReportAnnotations();
    72   nsString mAdapterRAMString;
    73   nsString mDeviceID;
    74   nsString mDriverVersion;
    75   nsString mDriverDate;
    76   nsString mDeviceKey;
    78   nsString mAdapterVendorID;
    79   nsString mAdapterDeviceID;
    81   uint32_t mOSXVersion;
    82 };
    84 } // namespace widget
    85 } // namespace mozilla
    87 #endif /* __mozilla_widget_GfxInfo_h__ */

mercurial