зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1766308 - Add gfxVars::CodecSupportInfo to store user-readable codec support string r=media-playback-reviewers,alwu
Differential Revision: https://phabricator.services.mozilla.com/D147386
This commit is contained in:
Родитель
9eeb816180
Коммит
4e1baacec1
|
@ -84,6 +84,7 @@ class gfxVarReceiver;
|
|||
_(UseEGL, bool, false) \
|
||||
_(DrmRenderDevice, nsCString, nsCString()) \
|
||||
_(UseDMABuf, bool, false) \
|
||||
_(CodecSupportInfo, nsCString, nsCString()) \
|
||||
_(WebRenderRequiresHardwareDriver, bool, false) \
|
||||
_(SupportsThreadsafeGL, bool, false) \
|
||||
_(OffscreenCanvasDomainAllowlist, nsCString, nsCString()) \
|
||||
|
|
|
@ -154,6 +154,9 @@ class MockGfxInfo final : public nsIGfxInfo {
|
|||
NS_IMETHOD GetTargetFrameRate(uint32_t* aTargetFrameRate) override {
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
NS_IMETHOD GetCodecSupportInfo(nsACString& aCodecSupportInfo) override {
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
NS_IMETHOD GetD2DEnabled(bool* aD2DEnabled) override {
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
|
|
@ -1865,6 +1865,12 @@ GfxInfoBase::GetTargetFrameRate(uint32_t* aTargetFrameRate) {
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
GfxInfoBase::GetCodecSupportInfo(nsACString& aCodecSupportInfo) {
|
||||
aCodecSupportInfo.Assign(gfx::gfxVars::CodecSupportInfo());
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
GfxInfoBase::GetIsHeadless(bool* aIsHeadless) {
|
||||
*aIsHeadless = gfxPlatform::IsHeadless();
|
||||
|
|
|
@ -71,6 +71,7 @@ class GfxInfoBase : public nsIGfxInfo,
|
|||
NS_IMETHOD GetWebRenderEnabled(bool* aWebRenderEnabled) override;
|
||||
NS_IMETHOD GetIsHeadless(bool* aIsHeadless) override;
|
||||
NS_IMETHOD GetTargetFrameRate(uint32_t* aTargetFrameRate) override;
|
||||
NS_IMETHOD GetCodecSupportInfo(nsACString& aCodecSupportInfo) override;
|
||||
|
||||
// Non-XPCOM method to get IPC data:
|
||||
nsTArray<mozilla::gfx::GfxInfoFeatureStatus> GetAllFeatures();
|
||||
|
|
|
@ -37,6 +37,7 @@ interface nsIGfxInfo : nsISupports
|
|||
readonly attribute boolean WebRenderEnabled;
|
||||
readonly attribute boolean isHeadless;
|
||||
readonly attribute unsigned long TargetFrameRate;
|
||||
readonly attribute ACString CodecSupportInfo;
|
||||
|
||||
// XXX: Switch to a list of devices, rather than explicitly numbering them.
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче