зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1654957 - Prelude: move GfxInfoFeatureStatus from dom to gfx. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D85488
This commit is contained in:
Родитель
b9cc2eb001
Коммит
e0230397f6
|
@ -289,13 +289,6 @@ struct GMPCapabilityData
|
|||
GMPAPITags[] capabilities;
|
||||
};
|
||||
|
||||
struct GfxInfoFeatureStatus
|
||||
{
|
||||
int32_t feature;
|
||||
int32_t status;
|
||||
nsCString failureId;
|
||||
};
|
||||
|
||||
struct XPCOMInitData
|
||||
{
|
||||
bool isOffline;
|
||||
|
|
|
@ -81,5 +81,12 @@ struct GfxVarUpdate
|
|||
GfxVarValue value;
|
||||
};
|
||||
|
||||
struct GfxInfoFeatureStatus
|
||||
{
|
||||
int32_t feature;
|
||||
int32_t status;
|
||||
nsCString failureId;
|
||||
};
|
||||
|
||||
} // namespace gfx
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -41,7 +41,7 @@ using namespace mozilla;
|
|||
using mozilla::MutexAutoLock;
|
||||
|
||||
nsTArray<GfxDriverInfo>* GfxInfoBase::sDriverInfo;
|
||||
nsTArray<dom::GfxInfoFeatureStatus>* GfxInfoBase::sFeatureStatus;
|
||||
nsTArray<gfx::GfxInfoFeatureStatus>* GfxInfoBase::sFeatureStatus;
|
||||
bool GfxInfoBase::sDriverInfoObserverInitialized;
|
||||
bool GfxInfoBase::sShutdownOccurred;
|
||||
|
||||
|
@ -711,12 +711,12 @@ GfxInfoBase::GetFeatureStatus(int32_t aFeature, nsACString& aFailureId,
|
|||
void GfxInfoBase::GetAllFeatures(dom::XPCOMInitData& xpcomInit) {
|
||||
MOZ_RELEASE_ASSERT(XRE_IsParentProcess());
|
||||
if (!sFeatureStatus) {
|
||||
sFeatureStatus = new nsTArray<dom::GfxInfoFeatureStatus>();
|
||||
sFeatureStatus = new nsTArray<gfx::GfxInfoFeatureStatus>();
|
||||
for (int32_t i = 1; i <= nsIGfxInfo::FEATURE_MAX_VALUE; ++i) {
|
||||
int32_t status = 0;
|
||||
nsAutoCString failureId;
|
||||
GetFeatureStatus(i, failureId, &status);
|
||||
dom::GfxInfoFeatureStatus gfxFeatureStatus;
|
||||
gfx::GfxInfoFeatureStatus gfxFeatureStatus;
|
||||
gfxFeatureStatus.feature() = i;
|
||||
gfxFeatureStatus.status() = status;
|
||||
gfxFeatureStatus.failureId() = failureId;
|
||||
|
@ -724,7 +724,7 @@ void GfxInfoBase::GetAllFeatures(dom::XPCOMInitData& xpcomInit) {
|
|||
}
|
||||
}
|
||||
for (const auto& status : *sFeatureStatus) {
|
||||
dom::GfxInfoFeatureStatus copy = status;
|
||||
gfx::GfxInfoFeatureStatus copy = status;
|
||||
xpcomInit.gfxFeatureStatus().AppendElement(copy);
|
||||
}
|
||||
}
|
||||
|
@ -1089,9 +1089,9 @@ int32_t GfxInfoBase::FindBlocklistedDeviceInList(
|
|||
}
|
||||
|
||||
void GfxInfoBase::SetFeatureStatus(
|
||||
const nsTArray<dom::GfxInfoFeatureStatus>& aFS) {
|
||||
const nsTArray<gfx::GfxInfoFeatureStatus>& aFS) {
|
||||
MOZ_ASSERT(!sFeatureStatus);
|
||||
sFeatureStatus = new nsTArray<dom::GfxInfoFeatureStatus>(aFS.Clone());
|
||||
sFeatureStatus = new nsTArray<gfx::GfxInfoFeatureStatus>(aFS.Clone());
|
||||
}
|
||||
|
||||
bool GfxInfoBase::DoesDesktopEnvironmentMatch(
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include "mozilla/Maybe.h"
|
||||
#include "mozilla/Mutex.h"
|
||||
#include "mozilla/dom/PContentParent.h"
|
||||
#include "mozilla/gfx/GraphicsMessages.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIGfxInfo.h"
|
||||
#include "nsIGfxInfoDebug.h"
|
||||
|
@ -94,7 +95,7 @@ class GfxInfoBase : public nsIGfxInfo,
|
|||
static void RemoveCollector(GfxInfoCollectorBase* collector);
|
||||
|
||||
static nsTArray<GfxDriverInfo>* sDriverInfo;
|
||||
static nsTArray<mozilla::dom::GfxInfoFeatureStatus>* sFeatureStatus;
|
||||
static nsTArray<mozilla::gfx::GfxInfoFeatureStatus>* sFeatureStatus;
|
||||
static bool sDriverInfoObserverInitialized;
|
||||
static bool sShutdownOccurred;
|
||||
|
||||
|
@ -111,7 +112,7 @@ class GfxInfoBase : public nsIGfxInfo,
|
|||
virtual nsresult FindMonitors(JSContext* cx, JS::HandleObject array);
|
||||
|
||||
static void SetFeatureStatus(
|
||||
const nsTArray<mozilla::dom::GfxInfoFeatureStatus>& aFS);
|
||||
const nsTArray<mozilla::gfx::GfxInfoFeatureStatus>& aFS);
|
||||
|
||||
protected:
|
||||
virtual ~GfxInfoBase();
|
||||
|
|
Загрузка…
Ссылка в новой задаче