|
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/. */ |
|
7 |
|
8 #ifndef __mozilla_widget_GfxInfo_h__ |
|
9 #define __mozilla_widget_GfxInfo_h__ |
|
10 |
|
11 #include "GfxInfoBase.h" |
|
12 |
|
13 namespace mozilla { |
|
14 namespace widget { |
|
15 |
|
16 class GfxInfo : public GfxInfoBase |
|
17 { |
|
18 public: |
|
19 GfxInfo(); |
|
20 |
|
21 // We only declare the subset of nsIGfxInfo that we actually implement. The |
|
22 // rest is brought forward from GfxInfoBase. |
|
23 NS_IMETHOD GetD2DEnabled(bool *aD2DEnabled); |
|
24 NS_IMETHOD GetDWriteEnabled(bool *aDWriteEnabled); |
|
25 NS_IMETHOD GetDWriteVersion(nsAString & aDwriteVersion); |
|
26 NS_IMETHOD GetCleartypeParameters(nsAString & aCleartypeParams); |
|
27 NS_IMETHOD GetAdapterDescription(nsAString & aAdapterDescription); |
|
28 NS_IMETHOD GetAdapterDriver(nsAString & aAdapterDriver); |
|
29 NS_IMETHOD GetAdapterVendorID(nsAString & aAdapterVendorID); |
|
30 NS_IMETHOD GetAdapterDeviceID(nsAString & aAdapterDeviceID); |
|
31 NS_IMETHOD GetAdapterRAM(nsAString & aAdapterRAM); |
|
32 NS_IMETHOD GetAdapterDriverVersion(nsAString & aAdapterDriverVersion); |
|
33 NS_IMETHOD GetAdapterDriverDate(nsAString & aAdapterDriverDate); |
|
34 NS_IMETHOD GetAdapterDescription2(nsAString & aAdapterDescription); |
|
35 NS_IMETHOD GetAdapterDriver2(nsAString & aAdapterDriver); |
|
36 NS_IMETHOD GetAdapterVendorID2(nsAString & aAdapterVendorID); |
|
37 NS_IMETHOD GetAdapterDeviceID2(nsAString & aAdapterDeviceID); |
|
38 NS_IMETHOD GetAdapterRAM2(nsAString & aAdapterRAM); |
|
39 NS_IMETHOD GetAdapterDriverVersion2(nsAString & aAdapterDriverVersion); |
|
40 NS_IMETHOD GetAdapterDriverDate2(nsAString & aAdapterDriverDate); |
|
41 NS_IMETHOD GetIsGPU2Active(bool *aIsGPU2Active); |
|
42 using GfxInfoBase::GetFeatureStatus; |
|
43 using GfxInfoBase::GetFeatureSuggestedDriverVersion; |
|
44 using GfxInfoBase::GetWebGLParameter; |
|
45 |
|
46 virtual nsresult Init(); |
|
47 |
|
48 virtual uint32_t OperatingSystemVersion() MOZ_OVERRIDE { return mWindowsVersion; } |
|
49 |
|
50 #ifdef DEBUG |
|
51 NS_DECL_ISUPPORTS_INHERITED |
|
52 NS_DECL_NSIGFXINFODEBUG |
|
53 #endif |
|
54 |
|
55 protected: |
|
56 |
|
57 virtual nsresult GetFeatureStatusImpl(int32_t aFeature, |
|
58 int32_t *aStatus, |
|
59 nsAString & aSuggestedDriverVersion, |
|
60 const nsTArray<GfxDriverInfo>& aDriverInfo, |
|
61 OperatingSystem* aOS = nullptr); |
|
62 virtual const nsTArray<GfxDriverInfo>& GetGfxDriverInfo(); |
|
63 |
|
64 private: |
|
65 |
|
66 void AddCrashReportAnnotations(); |
|
67 nsString mDeviceString; |
|
68 nsString mDeviceID; |
|
69 nsString mDriverVersion; |
|
70 nsString mDriverDate; |
|
71 nsString mDeviceKey; |
|
72 nsString mDeviceKeyDebug; |
|
73 nsString mAdapterVendorID; |
|
74 nsString mAdapterDeviceID; |
|
75 uint32_t mAdapterSubsysID; |
|
76 nsString mDeviceString2; |
|
77 nsString mDriverVersion2; |
|
78 nsString mDeviceID2; |
|
79 nsString mDriverDate2; |
|
80 nsString mDeviceKey2; |
|
81 nsString mAdapterVendorID2; |
|
82 nsString mAdapterDeviceID2; |
|
83 uint32_t mAdapterSubsysID2; |
|
84 uint32_t mWindowsVersion; |
|
85 bool mHasDualGPU; |
|
86 bool mIsGPU2Active; |
|
87 bool mHasDriverVersionMismatch; |
|
88 }; |
|
89 |
|
90 } // namespace widget |
|
91 } // namespace mozilla |
|
92 |
|
93 #endif /* __mozilla_widget_GfxInfo_h__ */ |