widget/android/GfxInfo.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/widget/android/GfxInfo.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,99 @@
     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 +#include "GfxDriverInfo.h"
    1.16 +
    1.17 +#include "nsString.h"
    1.18 +#include "mozilla/Scoped.h"
    1.19 +
    1.20 +namespace mozilla {
    1.21 +
    1.22 +namespace gl {
    1.23 +class GLContext;
    1.24 +}
    1.25 +
    1.26 +namespace widget {
    1.27 +
    1.28 +class GfxInfo : public GfxInfoBase
    1.29 +{
    1.30 +public:
    1.31 +  GfxInfo();
    1.32 +
    1.33 +  // We only declare the subset of nsIGfxInfo that we actually implement. The
    1.34 +  // rest is brought forward from GfxInfoBase.
    1.35 +  NS_IMETHOD GetD2DEnabled(bool *aD2DEnabled);
    1.36 +  NS_IMETHOD GetDWriteEnabled(bool *aDWriteEnabled);
    1.37 +  NS_IMETHOD GetDWriteVersion(nsAString & aDwriteVersion);
    1.38 +  NS_IMETHOD GetCleartypeParameters(nsAString & aCleartypeParams);
    1.39 +  NS_IMETHOD GetAdapterDescription(nsAString & aAdapterDescription);
    1.40 +  NS_IMETHOD GetAdapterDriver(nsAString & aAdapterDriver);
    1.41 +  NS_IMETHOD GetAdapterVendorID(nsAString & aAdapterVendorID);
    1.42 +  NS_IMETHOD GetAdapterDeviceID(nsAString & aAdapterDeviceID);
    1.43 +  NS_IMETHOD GetAdapterRAM(nsAString & aAdapterRAM);
    1.44 +  NS_IMETHOD GetAdapterDriverVersion(nsAString & aAdapterDriverVersion);
    1.45 +  NS_IMETHOD GetAdapterDriverDate(nsAString & aAdapterDriverDate);
    1.46 +  NS_IMETHOD GetAdapterDescription2(nsAString & aAdapterDescription);
    1.47 +  NS_IMETHOD GetAdapterDriver2(nsAString & aAdapterDriver);
    1.48 +  NS_IMETHOD GetAdapterVendorID2(nsAString & aAdapterVendorID);
    1.49 +  NS_IMETHOD GetAdapterDeviceID2(nsAString & aAdapterDeviceID);
    1.50 +  NS_IMETHOD GetAdapterRAM2(nsAString & aAdapterRAM);
    1.51 +  NS_IMETHOD GetAdapterDriverVersion2(nsAString & aAdapterDriverVersion);
    1.52 +  NS_IMETHOD GetAdapterDriverDate2(nsAString & aAdapterDriverDate);
    1.53 +  NS_IMETHOD GetIsGPU2Active(bool *aIsGPU2Active);
    1.54 +  using GfxInfoBase::GetFeatureStatus;
    1.55 +  using GfxInfoBase::GetFeatureSuggestedDriverVersion;
    1.56 +  using GfxInfoBase::GetWebGLParameter;
    1.57 +
    1.58 +  void EnsureInitialized();
    1.59 +
    1.60 +  virtual nsString Model();
    1.61 +  virtual nsString Hardware();
    1.62 +  virtual nsString Product();
    1.63 +  virtual nsString Manufacturer();
    1.64 +
    1.65 +#ifdef DEBUG
    1.66 +  NS_DECL_ISUPPORTS_INHERITED
    1.67 +  NS_DECL_NSIGFXINFODEBUG
    1.68 +#endif
    1.69 +
    1.70 +  virtual uint32_t OperatingSystemVersion() MOZ_OVERRIDE;
    1.71 +
    1.72 +protected:
    1.73 +
    1.74 +  virtual nsresult GetFeatureStatusImpl(int32_t aFeature, 
    1.75 +                                        int32_t *aStatus, 
    1.76 +                                        nsAString & aSuggestedDriverVersion, 
    1.77 +                                        const nsTArray<GfxDriverInfo>& aDriverInfo,
    1.78 +                                        OperatingSystem* aOS = nullptr);
    1.79 +  virtual const nsTArray<GfxDriverInfo>& GetGfxDriverInfo();
    1.80 +
    1.81 +private:
    1.82 +
    1.83 +  void AddCrashReportAnnotations();
    1.84 +
    1.85 +  bool mInitialized;
    1.86 +
    1.87 +  class GLStrings;
    1.88 +  ScopedDeletePtr<GLStrings> mGLStrings;
    1.89 +
    1.90 +  nsCString mAdapterDescription;
    1.91 +
    1.92 +  OperatingSystem mOS;
    1.93 +
    1.94 +  nsString mModel, mHardware, mManufacturer, mProduct;
    1.95 +  nsCString mOSVersion;
    1.96 +  uint32_t mOSVersionInteger;
    1.97 +};
    1.98 +
    1.99 +} // namespace widget
   1.100 +} // namespace mozilla
   1.101 +
   1.102 +#endif /* __mozilla_widget_GfxInfo_h__ */

mercurial