widget/windows/GfxInfo.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/widget/windows/GfxInfo.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,93 @@
     1.4 +/* vim: se cin sw=2 ts=2 et : */
     1.5 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
     1.6 + *
     1.7 + * This Source Code Form is subject to the terms of the Mozilla Public
     1.8 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.9 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
    1.10 +
    1.11 +#ifndef __mozilla_widget_GfxInfo_h__
    1.12 +#define __mozilla_widget_GfxInfo_h__
    1.13 +
    1.14 +#include "GfxInfoBase.h"
    1.15 +
    1.16 +namespace mozilla {
    1.17 +namespace widget {
    1.18 +
    1.19 +class GfxInfo : public GfxInfoBase
    1.20 +{
    1.21 +public:
    1.22 +  GfxInfo();
    1.23 +
    1.24 +  // We only declare the subset of nsIGfxInfo that we actually implement. The
    1.25 +  // rest is brought forward from GfxInfoBase.
    1.26 +  NS_IMETHOD GetD2DEnabled(bool *aD2DEnabled);
    1.27 +  NS_IMETHOD GetDWriteEnabled(bool *aDWriteEnabled);
    1.28 +  NS_IMETHOD GetDWriteVersion(nsAString & aDwriteVersion);
    1.29 +  NS_IMETHOD GetCleartypeParameters(nsAString & aCleartypeParams);
    1.30 +  NS_IMETHOD GetAdapterDescription(nsAString & aAdapterDescription);
    1.31 +  NS_IMETHOD GetAdapterDriver(nsAString & aAdapterDriver);
    1.32 +  NS_IMETHOD GetAdapterVendorID(nsAString & aAdapterVendorID);
    1.33 +  NS_IMETHOD GetAdapterDeviceID(nsAString & aAdapterDeviceID);
    1.34 +  NS_IMETHOD GetAdapterRAM(nsAString & aAdapterRAM);
    1.35 +  NS_IMETHOD GetAdapterDriverVersion(nsAString & aAdapterDriverVersion);
    1.36 +  NS_IMETHOD GetAdapterDriverDate(nsAString & aAdapterDriverDate);
    1.37 +  NS_IMETHOD GetAdapterDescription2(nsAString & aAdapterDescription);
    1.38 +  NS_IMETHOD GetAdapterDriver2(nsAString & aAdapterDriver);
    1.39 +  NS_IMETHOD GetAdapterVendorID2(nsAString & aAdapterVendorID);
    1.40 +  NS_IMETHOD GetAdapterDeviceID2(nsAString & aAdapterDeviceID);
    1.41 +  NS_IMETHOD GetAdapterRAM2(nsAString & aAdapterRAM);
    1.42 +  NS_IMETHOD GetAdapterDriverVersion2(nsAString & aAdapterDriverVersion);
    1.43 +  NS_IMETHOD GetAdapterDriverDate2(nsAString & aAdapterDriverDate);
    1.44 +  NS_IMETHOD GetIsGPU2Active(bool *aIsGPU2Active);
    1.45 +  using GfxInfoBase::GetFeatureStatus;
    1.46 +  using GfxInfoBase::GetFeatureSuggestedDriverVersion;
    1.47 +  using GfxInfoBase::GetWebGLParameter;
    1.48 +
    1.49 +  virtual nsresult Init();
    1.50 +
    1.51 +  virtual uint32_t OperatingSystemVersion() MOZ_OVERRIDE { return mWindowsVersion; }
    1.52 +
    1.53 +#ifdef DEBUG
    1.54 +  NS_DECL_ISUPPORTS_INHERITED
    1.55 +  NS_DECL_NSIGFXINFODEBUG
    1.56 +#endif
    1.57 +
    1.58 +protected:
    1.59 +
    1.60 +  virtual nsresult GetFeatureStatusImpl(int32_t aFeature, 
    1.61 +                                        int32_t *aStatus, 
    1.62 +                                        nsAString & aSuggestedDriverVersion, 
    1.63 +                                        const nsTArray<GfxDriverInfo>& aDriverInfo, 
    1.64 +                                        OperatingSystem* aOS = nullptr);
    1.65 +  virtual const nsTArray<GfxDriverInfo>& GetGfxDriverInfo();
    1.66 +
    1.67 +private:
    1.68 +
    1.69 +  void AddCrashReportAnnotations();
    1.70 +  nsString mDeviceString;
    1.71 +  nsString mDeviceID;
    1.72 +  nsString mDriverVersion;
    1.73 +  nsString mDriverDate;
    1.74 +  nsString mDeviceKey;
    1.75 +  nsString mDeviceKeyDebug;
    1.76 +  nsString mAdapterVendorID;
    1.77 +  nsString mAdapterDeviceID;
    1.78 +  uint32_t mAdapterSubsysID;
    1.79 +  nsString mDeviceString2;
    1.80 +  nsString mDriverVersion2;
    1.81 +  nsString mDeviceID2;
    1.82 +  nsString mDriverDate2;
    1.83 +  nsString mDeviceKey2;
    1.84 +  nsString mAdapterVendorID2;
    1.85 +  nsString mAdapterDeviceID2;
    1.86 +  uint32_t mAdapterSubsysID2;
    1.87 +  uint32_t mWindowsVersion;
    1.88 +  bool mHasDualGPU;
    1.89 +  bool mIsGPU2Active;
    1.90 +  bool mHasDriverVersionMismatch;
    1.91 +};
    1.92 +
    1.93 +} // namespace widget
    1.94 +} // namespace mozilla
    1.95 +
    1.96 +#endif /* __mozilla_widget_GfxInfo_h__ */

mercurial