widget/xpwidgets/GfxInfoX11.h

Fri, 16 Jan 2015 04:50:19 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 04:50:19 +0100
branch
TOR_BUG_9701
changeset 13
44a2da4a2ab2
permissions
-rw-r--r--

Replace accessor implementation with direct member state manipulation, by
request https://trac.torproject.org/projects/tor/ticket/9701#comment:32

michael@0 1 /* vim: se cin sw=2 ts=2 et : */
michael@0 2 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
michael@0 3 *
michael@0 4 * This Source Code Form is subject to the terms of the Mozilla Public
michael@0 5 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 7
michael@0 8 #ifndef __GfxInfoX11_h__
michael@0 9 #define __GfxInfoX11_h__
michael@0 10
michael@0 11 #include "GfxInfoBase.h"
michael@0 12
michael@0 13 namespace mozilla {
michael@0 14 namespace widget {
michael@0 15
michael@0 16 class GfxInfo : public GfxInfoBase
michael@0 17 {
michael@0 18 public:
michael@0 19
michael@0 20 // We only declare the subset of nsIGfxInfo that we actually implement. The
michael@0 21 // rest is brought forward from GfxInfoBase.
michael@0 22 NS_IMETHOD GetD2DEnabled(bool *aD2DEnabled);
michael@0 23 NS_IMETHOD GetDWriteEnabled(bool *aDWriteEnabled);
michael@0 24 NS_IMETHOD GetDWriteVersion(nsAString & aDwriteVersion);
michael@0 25 NS_IMETHOD GetCleartypeParameters(nsAString & aCleartypeParams);
michael@0 26 NS_IMETHOD GetAdapterDescription(nsAString & aAdapterDescription);
michael@0 27 NS_IMETHOD GetAdapterDriver(nsAString & aAdapterDriver);
michael@0 28 NS_IMETHOD GetAdapterVendorID(nsAString & aAdapterVendorID);
michael@0 29 NS_IMETHOD GetAdapterDeviceID(nsAString & aAdapterDeviceID);
michael@0 30 NS_IMETHOD GetAdapterRAM(nsAString & aAdapterRAM);
michael@0 31 NS_IMETHOD GetAdapterDriverVersion(nsAString & aAdapterDriverVersion);
michael@0 32 NS_IMETHOD GetAdapterDriverDate(nsAString & aAdapterDriverDate);
michael@0 33 NS_IMETHOD GetAdapterDescription2(nsAString & aAdapterDescription);
michael@0 34 NS_IMETHOD GetAdapterDriver2(nsAString & aAdapterDriver);
michael@0 35 NS_IMETHOD GetAdapterVendorID2(nsAString & aAdapterVendorID);
michael@0 36 NS_IMETHOD GetAdapterDeviceID2(nsAString & aAdapterDeviceID);
michael@0 37 NS_IMETHOD GetAdapterRAM2(nsAString & aAdapterRAM);
michael@0 38 NS_IMETHOD GetAdapterDriverVersion2(nsAString & aAdapterDriverVersion);
michael@0 39 NS_IMETHOD GetAdapterDriverDate2(nsAString & aAdapterDriverDate);
michael@0 40 NS_IMETHOD GetIsGPU2Active(bool *aIsGPU2Active);
michael@0 41 using GfxInfoBase::GetFeatureStatus;
michael@0 42 using GfxInfoBase::GetFeatureSuggestedDriverVersion;
michael@0 43 using GfxInfoBase::GetWebGLParameter;
michael@0 44
michael@0 45 virtual nsresult Init();
michael@0 46
michael@0 47 NS_IMETHOD_(void) GetData();
michael@0 48
michael@0 49 #ifdef DEBUG
michael@0 50 NS_DECL_ISUPPORTS_INHERITED
michael@0 51 NS_DECL_NSIGFXINFODEBUG
michael@0 52 #endif
michael@0 53
michael@0 54 protected:
michael@0 55
michael@0 56 virtual nsresult GetFeatureStatusImpl(int32_t aFeature,
michael@0 57 int32_t *aStatus,
michael@0 58 nsAString & aSuggestedDriverVersion,
michael@0 59 const nsTArray<GfxDriverInfo>& aDriverInfo,
michael@0 60 OperatingSystem* aOS = nullptr);
michael@0 61 virtual const nsTArray<GfxDriverInfo>& GetGfxDriverInfo();
michael@0 62
michael@0 63 private:
michael@0 64 nsCString mVendor;
michael@0 65 nsCString mRenderer;
michael@0 66 nsCString mVersion;
michael@0 67 nsCString mAdapterDescription;
michael@0 68 nsCString mOS;
michael@0 69 nsCString mOSRelease;
michael@0 70 bool mIsMesa, mIsNVIDIA, mIsFGLRX, mIsNouveau, mIsIntel, mIsOldSwrast, mIsLlvmpipe;
michael@0 71 bool mHasTextureFromPixmap;
michael@0 72 int mGLMajorVersion, mMajorVersion, mMinorVersion, mRevisionVersion;
michael@0 73
michael@0 74 void AddCrashReportAnnotations();
michael@0 75 };
michael@0 76
michael@0 77 } // namespace widget
michael@0 78 } // namespace mozilla
michael@0 79
michael@0 80 #endif /* __GfxInfoX11_h__ */

mercurial