Bug 1931425 - Limit how often moz-label's #setStyles runs r=reusable-components-revie...
[gecko.git] / widget / uikit / GfxInfo.h
blob55deb58544de6561effdb9d03a3261a23a9ef0bd
1 /* vim: se cin sw=2 ts=2 et : */
2 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
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"
12 #include "GfxDriverInfo.h"
14 #include "nsString.h"
15 #include "mozilla/UniquePtr.h"
17 namespace mozilla {
19 namespace gl {
20 class GLContext;
23 namespace widget {
25 class GfxInfo : public GfxInfoBase {
26 private:
27 ~GfxInfo();
29 public:
30 GfxInfo();
32 OperatingSystem GetOperatingSystem() override { return OperatingSystem::Ios; }
34 // We only declare the subset of nsIGfxInfo that we actually implement. The
35 // rest is brought forward from GfxInfoBase.
36 NS_IMETHOD GetD2DEnabled(bool* aD2DEnabled) override;
37 NS_IMETHOD GetDWriteEnabled(bool* aDWriteEnabled) override;
38 NS_IMETHOD GetEmbeddedInFirefoxReality(
39 bool* aEmbeddedInFirefoxReality) override;
40 NS_IMETHOD GetHasBattery(bool* aHasBattery) override;
41 NS_IMETHOD GetDWriteVersion(nsAString& aDwriteVersion) override;
42 NS_IMETHOD GetCleartypeParameters(nsAString& aCleartypeParams) override;
43 NS_IMETHOD GetWindowProtocol(nsAString& aWindowProtocol) override;
44 NS_IMETHOD GetTestType(nsAString& aTestType) override;
45 NS_IMETHOD GetAdapterDescription(nsAString& aAdapterDescription) override;
46 NS_IMETHOD GetAdapterDriver(nsAString& aAdapterDriver) override;
47 NS_IMETHOD GetAdapterVendorID(nsAString& aAdapterVendorID) override;
48 NS_IMETHOD GetAdapterDeviceID(nsAString& aAdapterDeviceID) override;
49 NS_IMETHOD GetAdapterSubsysID(nsAString& aAdapterSubsysID) override;
50 NS_IMETHOD GetAdapterRAM(uint32_t* aAdapterRAM) override;
51 NS_IMETHOD GetAdapterDriverVendor(nsAString& aAdapterDriverVendor) override;
52 NS_IMETHOD GetAdapterDriverVersion(nsAString& aAdapterDriverVersion) override;
53 NS_IMETHOD GetAdapterDriverDate(nsAString& aAdapterDriverDate) override;
54 NS_IMETHOD GetAdapterDescription2(nsAString& aAdapterDescription) override;
55 NS_IMETHOD GetAdapterDriver2(nsAString& aAdapterDriver) override;
56 NS_IMETHOD GetAdapterVendorID2(nsAString& aAdapterVendorID) override;
57 NS_IMETHOD GetAdapterDeviceID2(nsAString& aAdapterDeviceID) override;
58 NS_IMETHOD GetAdapterSubsysID2(nsAString& aAdapterSubsysID) override;
59 NS_IMETHOD GetAdapterRAM2(uint32_t* aAdapterRAM) override;
60 NS_IMETHOD GetAdapterDriverVendor2(nsAString& aAdapterDriverVendor) override;
61 NS_IMETHOD GetAdapterDriverVersion2(
62 nsAString& aAdapterDriverVersion) override;
63 NS_IMETHOD GetAdapterDriverDate2(nsAString& aAdapterDriverDate) override;
64 NS_IMETHOD GetIsGPU2Active(bool* aIsGPU2Active) override;
65 NS_IMETHOD GetDrmRenderDevice(nsACString& aDrmRenderDevice) override;
66 using GfxInfoBase::GetFeatureStatus;
67 using GfxInfoBase::GetFeatureSuggestedDriverVersion;
69 #ifdef DEBUG
70 NS_DECL_ISUPPORTS_INHERITED
71 NS_DECL_NSIGFXINFODEBUG
72 #endif
74 protected:
75 nsresult GetFeatureStatusImpl(int32_t aFeature, int32_t* aStatus,
76 nsAString& aSuggestedDriverVersion,
77 const nsTArray<GfxDriverInfo>& aDriverInfo,
78 nsACString& aFailureId,
79 OperatingSystem* aOS = nullptr) override;
80 const nsTArray<GfxDriverInfo>& GetGfxDriverInfo() override;
83 } // namespace widget
84 } // namespace mozilla
86 #endif /* __mozilla_widget_GfxInfo_h__ */