1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/widget/cocoa/GfxInfo.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,87 @@ 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 __mozilla_widget_GfxInfo_h__ 1.12 +#define __mozilla_widget_GfxInfo_h__ 1.13 + 1.14 +#include "GfxInfoBase.h" 1.15 + 1.16 +#include "nsString.h" 1.17 + 1.18 +namespace mozilla { 1.19 +namespace widget { 1.20 + 1.21 +class GfxInfo : public GfxInfoBase 1.22 +{ 1.23 +public: 1.24 + 1.25 + GfxInfo(); 1.26 + // We only declare the subset of nsIGfxInfo that we actually implement. The 1.27 + // rest is brought forward from GfxInfoBase. 1.28 + NS_IMETHOD GetD2DEnabled(bool *aD2DEnabled); 1.29 + NS_IMETHOD GetDWriteEnabled(bool *aDWriteEnabled); 1.30 + NS_IMETHOD GetDWriteVersion(nsAString & aDwriteVersion); 1.31 + NS_IMETHOD GetCleartypeParameters(nsAString & aCleartypeParams); 1.32 + NS_IMETHOD GetAdapterDescription(nsAString & aAdapterDescription); 1.33 + NS_IMETHOD GetAdapterDriver(nsAString & aAdapterDriver); 1.34 + NS_IMETHOD GetAdapterVendorID(nsAString & aAdapterVendorID); 1.35 + NS_IMETHOD GetAdapterDeviceID(nsAString & aAdapterDeviceID); 1.36 + NS_IMETHOD GetAdapterRAM(nsAString & aAdapterRAM); 1.37 + NS_IMETHOD GetAdapterDriverVersion(nsAString & aAdapterDriverVersion); 1.38 + NS_IMETHOD GetAdapterDriverDate(nsAString & aAdapterDriverDate); 1.39 + NS_IMETHOD GetAdapterDescription2(nsAString & aAdapterDescription); 1.40 + NS_IMETHOD GetAdapterDriver2(nsAString & aAdapterDriver); 1.41 + NS_IMETHOD GetAdapterVendorID2(nsAString & aAdapterVendorID); 1.42 + NS_IMETHOD GetAdapterDeviceID2(nsAString & aAdapterDeviceID); 1.43 + NS_IMETHOD GetAdapterRAM2(nsAString & aAdapterRAM); 1.44 + NS_IMETHOD GetAdapterDriverVersion2(nsAString & aAdapterDriverVersion); 1.45 + NS_IMETHOD GetAdapterDriverDate2(nsAString & aAdapterDriverDate); 1.46 + NS_IMETHOD GetIsGPU2Active(bool *aIsGPU2Active); 1.47 + 1.48 + using GfxInfoBase::GetFeatureStatus; 1.49 + using GfxInfoBase::GetFeatureSuggestedDriverVersion; 1.50 + using GfxInfoBase::GetWebGLParameter; 1.51 + 1.52 + virtual nsresult Init(); 1.53 + 1.54 +#ifdef DEBUG 1.55 + NS_DECL_ISUPPORTS_INHERITED 1.56 + NS_DECL_NSIGFXINFODEBUG 1.57 +#endif 1.58 + 1.59 + virtual uint32_t OperatingSystemVersion() MOZ_OVERRIDE { return mOSXVersion; } 1.60 + 1.61 +protected: 1.62 + 1.63 + virtual nsresult GetFeatureStatusImpl(int32_t aFeature, 1.64 + int32_t *aStatus, 1.65 + nsAString & aSuggestedDriverVersion, 1.66 + const nsTArray<GfxDriverInfo>& aDriverInfo, 1.67 + OperatingSystem* aOS = nullptr); 1.68 + virtual const nsTArray<GfxDriverInfo>& GetGfxDriverInfo(); 1.69 + 1.70 +private: 1.71 + 1.72 + void GetDeviceInfo(); 1.73 + void AddCrashReportAnnotations(); 1.74 + 1.75 + nsString mAdapterRAMString; 1.76 + nsString mDeviceID; 1.77 + nsString mDriverVersion; 1.78 + nsString mDriverDate; 1.79 + nsString mDeviceKey; 1.80 + 1.81 + nsString mAdapterVendorID; 1.82 + nsString mAdapterDeviceID; 1.83 + 1.84 + uint32_t mOSXVersion; 1.85 +}; 1.86 + 1.87 +} // namespace widget 1.88 +} // namespace mozilla 1.89 + 1.90 +#endif /* __mozilla_widget_GfxInfo_h__ */