2013-08-13 01:55:28 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#include "GfxInfo.h"
|
|
|
|
|
|
|
|
using namespace mozilla::widget;
|
|
|
|
|
|
|
|
/* GetD2DEnabled and GetDwriteEnabled shouldn't be called until after gfxPlatform initialization
|
|
|
|
* has occurred because they depend on it for information. (See bug 591561) */
|
|
|
|
nsresult
|
|
|
|
GfxInfo::GetD2DEnabled(bool *aEnabled)
|
|
|
|
{
|
|
|
|
return NS_ERROR_FAILURE;
|
|
|
|
}
|
|
|
|
|
|
|
|
nsresult
|
|
|
|
GfxInfo::GetDWriteEnabled(bool *aEnabled)
|
|
|
|
{
|
|
|
|
return NS_ERROR_FAILURE;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
GfxInfo::GetDWriteVersion(nsAString & aDwriteVersion)
|
|
|
|
{
|
|
|
|
return NS_ERROR_FAILURE;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
GfxInfo::GetCleartypeParameters(nsAString & aCleartypeParams)
|
|
|
|
{
|
|
|
|
return NS_ERROR_FAILURE;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
GfxInfo::GetAdapterDescription(nsAString & aAdapterDescription)
|
|
|
|
{
|
2014-05-26 22:54:53 +04:00
|
|
|
aAdapterDescription.Truncate();
|
2013-08-13 01:55:28 +04:00
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
GfxInfo::GetAdapterDescription2(nsAString & aAdapterDescription)
|
|
|
|
{
|
|
|
|
return NS_ERROR_FAILURE;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
GfxInfo::GetAdapterRAM(nsAString & aAdapterRAM)
|
|
|
|
{
|
2014-05-26 22:54:53 +04:00
|
|
|
aAdapterRAM.Truncate();
|
2013-08-13 01:55:28 +04:00
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
GfxInfo::GetAdapterRAM2(nsAString & aAdapterRAM)
|
|
|
|
{
|
|
|
|
return NS_ERROR_FAILURE;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
GfxInfo::GetAdapterDriver(nsAString & aAdapterDriver)
|
|
|
|
{
|
2014-05-26 22:54:53 +04:00
|
|
|
aAdapterDriver.Truncate();
|
2013-08-13 01:55:28 +04:00
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
GfxInfo::GetAdapterDriver2(nsAString & aAdapterDriver)
|
|
|
|
{
|
|
|
|
return NS_ERROR_FAILURE;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
GfxInfo::GetAdapterDriverVersion(nsAString & aAdapterDriverVersion)
|
|
|
|
{
|
2014-05-26 22:54:53 +04:00
|
|
|
aAdapterDriverVersion.Truncate();
|
2013-08-13 01:55:28 +04:00
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
GfxInfo::GetAdapterDriverVersion2(nsAString & aAdapterDriverVersion)
|
|
|
|
{
|
|
|
|
return NS_ERROR_FAILURE;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
GfxInfo::GetAdapterDriverDate(nsAString & aAdapterDriverDate)
|
|
|
|
{
|
2014-05-26 22:54:53 +04:00
|
|
|
aAdapterDriverDate.Truncate();
|
2013-08-13 01:55:28 +04:00
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
GfxInfo::GetAdapterDriverDate2(nsAString & aAdapterDriverDate)
|
|
|
|
{
|
|
|
|
return NS_ERROR_FAILURE;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
GfxInfo::GetAdapterVendorID(nsAString & aAdapterVendorID)
|
|
|
|
{
|
2014-05-26 22:54:53 +04:00
|
|
|
aAdapterVendorID.Truncate();
|
2013-08-13 01:55:28 +04:00
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
GfxInfo::GetAdapterVendorID2(nsAString & aAdapterVendorID)
|
|
|
|
{
|
|
|
|
return NS_ERROR_FAILURE;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
GfxInfo::GetAdapterDeviceID(nsAString & aAdapterDeviceID)
|
|
|
|
{
|
2014-05-26 22:54:53 +04:00
|
|
|
aAdapterDeviceID.Truncate();
|
2013-08-13 01:55:28 +04:00
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
GfxInfo::GetAdapterDeviceID2(nsAString & aAdapterDeviceID)
|
|
|
|
{
|
|
|
|
return NS_ERROR_FAILURE;
|
|
|
|
}
|
|
|
|
|
2014-07-09 22:21:49 +04:00
|
|
|
NS_IMETHODIMP
|
|
|
|
GfxInfo::GetAdapterSubsysID(nsAString & aAdapterSubsysID)
|
|
|
|
{
|
|
|
|
return NS_ERROR_FAILURE;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
GfxInfo::GetAdapterSubsysID2(nsAString & aAdapterSubsysID)
|
|
|
|
{
|
|
|
|
return NS_ERROR_FAILURE;
|
|
|
|
}
|
|
|
|
|
2013-08-13 01:55:28 +04:00
|
|
|
NS_IMETHODIMP
|
|
|
|
GfxInfo::GetIsGPU2Active(bool* aIsGPU2Active)
|
|
|
|
{
|
|
|
|
return NS_ERROR_FAILURE;
|
|
|
|
}
|
|
|
|
|
|
|
|
const nsTArray<GfxDriverInfo>&
|
|
|
|
GfxInfo::GetGfxDriverInfo()
|
|
|
|
{
|
|
|
|
return *mDriverInfo;
|
|
|
|
}
|
|
|
|
|
2013-11-18 17:38:17 +04:00
|
|
|
uint32_t GfxInfo::OperatingSystemVersion()
|
2013-08-13 01:55:28 +04:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2013-08-28 03:26:46 +04:00
|
|
|
nsresult
|
|
|
|
GfxInfo::GetFeatureStatusImpl(int32_t /*aFeature*/,
|
|
|
|
int32_t *aStatus,
|
|
|
|
nsAString & /*aSuggestedDriverVersion*/,
|
|
|
|
const nsTArray<GfxDriverInfo>& /*aDriverInfo*/,
|
|
|
|
OperatingSystem* /*aOS*/ /* = nullptr */)
|
|
|
|
{
|
|
|
|
NS_ENSURE_ARG_POINTER(aStatus);
|
2014-07-02 01:44:09 +04:00
|
|
|
*aStatus = nsIGfxInfo::FEATURE_STATUS_OK;
|
2013-08-28 03:26:46 +04:00
|
|
|
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
2013-08-13 01:55:28 +04:00
|
|
|
#ifdef DEBUG
|
|
|
|
|
|
|
|
// Implement nsIGfxInfoDebug
|
|
|
|
|
|
|
|
NS_IMETHODIMP GfxInfo::SpoofVendorID(const nsAString &)
|
|
|
|
{
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP GfxInfo::SpoofDeviceID(const nsAString &)
|
|
|
|
{
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP GfxInfo::SpoofDriverVersion(const nsAString &)
|
|
|
|
{
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP GfxInfo::SpoofOSVersion(uint32_t)
|
|
|
|
{
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
2013-08-28 03:26:46 +04:00
|
|
|
#endif
|