|
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
|
2 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
3 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
5 |
|
6 #include "GfxInfo.h" |
|
7 |
|
8 using namespace mozilla::widget; |
|
9 |
|
10 /* GetD2DEnabled and GetDwriteEnabled shouldn't be called until after gfxPlatform initialization |
|
11 * has occurred because they depend on it for information. (See bug 591561) */ |
|
12 nsresult |
|
13 GfxInfo::GetD2DEnabled(bool *aEnabled) |
|
14 { |
|
15 return NS_ERROR_FAILURE; |
|
16 } |
|
17 |
|
18 nsresult |
|
19 GfxInfo::GetDWriteEnabled(bool *aEnabled) |
|
20 { |
|
21 return NS_ERROR_FAILURE; |
|
22 } |
|
23 |
|
24 /* readonly attribute DOMString DWriteVersion; */ |
|
25 NS_IMETHODIMP |
|
26 GfxInfo::GetDWriteVersion(nsAString & aDwriteVersion) |
|
27 { |
|
28 return NS_ERROR_FAILURE; |
|
29 } |
|
30 |
|
31 /* readonly attribute DOMString cleartypeParameters; */ |
|
32 NS_IMETHODIMP |
|
33 GfxInfo::GetCleartypeParameters(nsAString & aCleartypeParams) |
|
34 { |
|
35 return NS_ERROR_FAILURE; |
|
36 } |
|
37 |
|
38 /* readonly attribute DOMString adapterDescription; */ |
|
39 NS_IMETHODIMP |
|
40 GfxInfo::GetAdapterDescription(nsAString & aAdapterDescription) |
|
41 { |
|
42 aAdapterDescription.AssignLiteral(""); |
|
43 return NS_OK; |
|
44 } |
|
45 |
|
46 /* readonly attribute DOMString adapterDescription2; */ |
|
47 NS_IMETHODIMP |
|
48 GfxInfo::GetAdapterDescription2(nsAString & aAdapterDescription) |
|
49 { |
|
50 return NS_ERROR_FAILURE; |
|
51 } |
|
52 |
|
53 /* readonly attribute DOMString adapterRAM; */ |
|
54 NS_IMETHODIMP |
|
55 GfxInfo::GetAdapterRAM(nsAString & aAdapterRAM) |
|
56 { |
|
57 aAdapterRAM.AssignLiteral(""); |
|
58 return NS_OK; |
|
59 } |
|
60 |
|
61 /* readonly attribute DOMString adapterRAM2; */ |
|
62 NS_IMETHODIMP |
|
63 GfxInfo::GetAdapterRAM2(nsAString & aAdapterRAM) |
|
64 { |
|
65 return NS_ERROR_FAILURE; |
|
66 } |
|
67 |
|
68 /* readonly attribute DOMString adapterDriver; */ |
|
69 NS_IMETHODIMP |
|
70 GfxInfo::GetAdapterDriver(nsAString & aAdapterDriver) |
|
71 { |
|
72 aAdapterDriver.AssignLiteral(""); |
|
73 return NS_OK; |
|
74 } |
|
75 |
|
76 /* readonly attribute DOMString adapterDriver2; */ |
|
77 NS_IMETHODIMP |
|
78 GfxInfo::GetAdapterDriver2(nsAString & aAdapterDriver) |
|
79 { |
|
80 return NS_ERROR_FAILURE; |
|
81 } |
|
82 |
|
83 /* readonly attribute DOMString adapterDriverVersion; */ |
|
84 NS_IMETHODIMP |
|
85 GfxInfo::GetAdapterDriverVersion(nsAString & aAdapterDriverVersion) |
|
86 { |
|
87 aAdapterDriverVersion.AssignLiteral(""); |
|
88 return NS_OK; |
|
89 } |
|
90 |
|
91 /* readonly attribute DOMString adapterDriverVersion2; */ |
|
92 NS_IMETHODIMP |
|
93 GfxInfo::GetAdapterDriverVersion2(nsAString & aAdapterDriverVersion) |
|
94 { |
|
95 return NS_ERROR_FAILURE; |
|
96 } |
|
97 |
|
98 /* readonly attribute DOMString adapterDriverDate; */ |
|
99 NS_IMETHODIMP |
|
100 GfxInfo::GetAdapterDriverDate(nsAString & aAdapterDriverDate) |
|
101 { |
|
102 aAdapterDriverDate.AssignLiteral(""); |
|
103 return NS_OK; |
|
104 } |
|
105 |
|
106 /* readonly attribute DOMString adapterDriverDate2; */ |
|
107 NS_IMETHODIMP |
|
108 GfxInfo::GetAdapterDriverDate2(nsAString & aAdapterDriverDate) |
|
109 { |
|
110 return NS_ERROR_FAILURE; |
|
111 } |
|
112 |
|
113 /* readonly attribute DOMString adapterVendorID; */ |
|
114 NS_IMETHODIMP |
|
115 GfxInfo::GetAdapterVendorID(nsAString & aAdapterVendorID) |
|
116 { |
|
117 aAdapterVendorID.AssignLiteral(""); |
|
118 return NS_OK; |
|
119 } |
|
120 |
|
121 /* readonly attribute DOMString adapterVendorID2; */ |
|
122 NS_IMETHODIMP |
|
123 GfxInfo::GetAdapterVendorID2(nsAString & aAdapterVendorID) |
|
124 { |
|
125 return NS_ERROR_FAILURE; |
|
126 } |
|
127 |
|
128 /* readonly attribute DOMString adapterDeviceID; */ |
|
129 NS_IMETHODIMP |
|
130 GfxInfo::GetAdapterDeviceID(nsAString & aAdapterDeviceID) |
|
131 { |
|
132 aAdapterDeviceID.AssignLiteral(""); |
|
133 return NS_OK; |
|
134 } |
|
135 |
|
136 /* readonly attribute DOMString adapterDeviceID2; */ |
|
137 NS_IMETHODIMP |
|
138 GfxInfo::GetAdapterDeviceID2(nsAString & aAdapterDeviceID) |
|
139 { |
|
140 return NS_ERROR_FAILURE; |
|
141 } |
|
142 |
|
143 /* readonly attribute boolean isGPU2Active; */ |
|
144 NS_IMETHODIMP |
|
145 GfxInfo::GetIsGPU2Active(bool* aIsGPU2Active) |
|
146 { |
|
147 return NS_ERROR_FAILURE; |
|
148 } |
|
149 |
|
150 const nsTArray<GfxDriverInfo>& |
|
151 GfxInfo::GetGfxDriverInfo() |
|
152 { |
|
153 return *mDriverInfo; |
|
154 } |
|
155 |
|
156 uint32_t GfxInfo::OperatingSystemVersion() |
|
157 { |
|
158 return 0; |
|
159 } |
|
160 |
|
161 nsresult |
|
162 GfxInfo::GetFeatureStatusImpl(int32_t /*aFeature*/, |
|
163 int32_t *aStatus, |
|
164 nsAString & /*aSuggestedDriverVersion*/, |
|
165 const nsTArray<GfxDriverInfo>& /*aDriverInfo*/, |
|
166 OperatingSystem* /*aOS*/ /* = nullptr */) |
|
167 { |
|
168 NS_ENSURE_ARG_POINTER(aStatus); |
|
169 *aStatus = nsIGfxInfo::FEATURE_NO_INFO; |
|
170 |
|
171 return NS_OK; |
|
172 } |
|
173 |
|
174 #ifdef DEBUG |
|
175 |
|
176 // Implement nsIGfxInfoDebug |
|
177 |
|
178 /* void spoofVendorID (in DOMString aVendorID); */ |
|
179 NS_IMETHODIMP GfxInfo::SpoofVendorID(const nsAString &) |
|
180 { |
|
181 return NS_OK; |
|
182 } |
|
183 |
|
184 /* void spoofDeviceID (in unsigned long aDeviceID); */ |
|
185 NS_IMETHODIMP GfxInfo::SpoofDeviceID(const nsAString &) |
|
186 { |
|
187 return NS_OK; |
|
188 } |
|
189 |
|
190 /* void spoofDriverVersion (in DOMString aDriverVersion); */ |
|
191 NS_IMETHODIMP GfxInfo::SpoofDriverVersion(const nsAString &) |
|
192 { |
|
193 return NS_OK; |
|
194 } |
|
195 |
|
196 /* void spoofOSVersion (in unsigned long aVersion); */ |
|
197 NS_IMETHODIMP GfxInfo::SpoofOSVersion(uint32_t) |
|
198 { |
|
199 return NS_OK; |
|
200 } |
|
201 |
|
202 #endif |