widget/xpwidgets/GfxInfoX11.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/widget/xpwidgets/GfxInfoX11.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,80 @@
     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 __GfxInfoX11_h__
    1.12 +#define __GfxInfoX11_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 +
    1.23 +  // We only declare the subset of nsIGfxInfo that we actually implement. The
    1.24 +  // rest is brought forward from GfxInfoBase.
    1.25 +  NS_IMETHOD GetD2DEnabled(bool *aD2DEnabled);
    1.26 +  NS_IMETHOD GetDWriteEnabled(bool *aDWriteEnabled);
    1.27 +  NS_IMETHOD GetDWriteVersion(nsAString & aDwriteVersion);
    1.28 +  NS_IMETHOD GetCleartypeParameters(nsAString & aCleartypeParams);
    1.29 +  NS_IMETHOD GetAdapterDescription(nsAString & aAdapterDescription);
    1.30 +  NS_IMETHOD GetAdapterDriver(nsAString & aAdapterDriver);
    1.31 +  NS_IMETHOD GetAdapterVendorID(nsAString & aAdapterVendorID);
    1.32 +  NS_IMETHOD GetAdapterDeviceID(nsAString & aAdapterDeviceID);
    1.33 +  NS_IMETHOD GetAdapterRAM(nsAString & aAdapterRAM);
    1.34 +  NS_IMETHOD GetAdapterDriverVersion(nsAString & aAdapterDriverVersion);
    1.35 +  NS_IMETHOD GetAdapterDriverDate(nsAString & aAdapterDriverDate);
    1.36 +  NS_IMETHOD GetAdapterDescription2(nsAString & aAdapterDescription);
    1.37 +  NS_IMETHOD GetAdapterDriver2(nsAString & aAdapterDriver);
    1.38 +  NS_IMETHOD GetAdapterVendorID2(nsAString & aAdapterVendorID);
    1.39 +  NS_IMETHOD GetAdapterDeviceID2(nsAString & aAdapterDeviceID);
    1.40 +  NS_IMETHOD GetAdapterRAM2(nsAString & aAdapterRAM);
    1.41 +  NS_IMETHOD GetAdapterDriverVersion2(nsAString & aAdapterDriverVersion);
    1.42 +  NS_IMETHOD GetAdapterDriverDate2(nsAString & aAdapterDriverDate);
    1.43 +  NS_IMETHOD GetIsGPU2Active(bool *aIsGPU2Active);
    1.44 +  using GfxInfoBase::GetFeatureStatus;
    1.45 +  using GfxInfoBase::GetFeatureSuggestedDriverVersion;
    1.46 +  using GfxInfoBase::GetWebGLParameter;
    1.47 +
    1.48 +  virtual nsresult Init();
    1.49 +  
    1.50 +  NS_IMETHOD_(void) GetData();
    1.51 +
    1.52 +#ifdef DEBUG
    1.53 +  NS_DECL_ISUPPORTS_INHERITED
    1.54 +  NS_DECL_NSIGFXINFODEBUG
    1.55 +#endif
    1.56 +
    1.57 +protected:
    1.58 +
    1.59 +  virtual nsresult GetFeatureStatusImpl(int32_t aFeature, 
    1.60 +                                        int32_t *aStatus, 
    1.61 +                                        nsAString & aSuggestedDriverVersion, 
    1.62 +                                        const nsTArray<GfxDriverInfo>& aDriverInfo, 
    1.63 +                                        OperatingSystem* aOS = nullptr);
    1.64 +  virtual const nsTArray<GfxDriverInfo>& GetGfxDriverInfo();
    1.65 +
    1.66 +private:
    1.67 +  nsCString mVendor;
    1.68 +  nsCString mRenderer;
    1.69 +  nsCString mVersion;
    1.70 +  nsCString mAdapterDescription;
    1.71 +  nsCString mOS;
    1.72 +  nsCString mOSRelease;
    1.73 +  bool mIsMesa, mIsNVIDIA, mIsFGLRX, mIsNouveau, mIsIntel, mIsOldSwrast, mIsLlvmpipe;
    1.74 +  bool mHasTextureFromPixmap;
    1.75 +  int mGLMajorVersion, mMajorVersion, mMinorVersion, mRevisionVersion;
    1.76 +
    1.77 +  void AddCrashReportAnnotations();
    1.78 +};
    1.79 +
    1.80 +} // namespace widget
    1.81 +} // namespace mozilla
    1.82 +
    1.83 +#endif /* __GfxInfoX11_h__ */

mercurial