зеркало из https://github.com/mozilla/gecko-dev.git
Add Advanced Layers to the compositor line in about:support. (bug 1365879 part 22, r=milan)
--HG-- extra : rebase_source : 123d4190c0343b60491f34757b26532b9def5075
This commit is contained in:
Родитель
0505938414
Коммит
52d5447f23
|
@ -2330,6 +2330,26 @@ nsDOMWindowUtils::GetLayerManagerRemote(bool* retval)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NS_IMETHODIMP
|
||||||
|
nsDOMWindowUtils::GetUsingAdvancedLayers(bool* retval)
|
||||||
|
{
|
||||||
|
nsCOMPtr<nsIWidget> widget = GetWidget();
|
||||||
|
if (!widget) {
|
||||||
|
return NS_ERROR_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
LayerManager *mgr = widget->GetLayerManager();
|
||||||
|
if (!mgr) {
|
||||||
|
return NS_ERROR_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
*retval = false;
|
||||||
|
if (KnowsCompositor* fwd = mgr->AsKnowsCompositor()) {
|
||||||
|
*retval = fwd->GetTextureFactoryIdentifier().mUsingAdvancedLayers;
|
||||||
|
}
|
||||||
|
return NS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsDOMWindowUtils::GetSupportsHardwareH264Decoding(JS::MutableHandle<JS::Value> aPromise)
|
nsDOMWindowUtils::GetSupportsHardwareH264Decoding(JS::MutableHandle<JS::Value> aPromise)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1416,6 +1416,11 @@ interface nsIDOMWindowUtils : nsISupports {
|
||||||
*/
|
*/
|
||||||
readonly attribute boolean layerManagerRemote;
|
readonly attribute boolean layerManagerRemote;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* True if advanced layers is enabled on this window, false otherwise.
|
||||||
|
*/
|
||||||
|
readonly attribute boolean usingAdvancedLayers;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a Promise that will be resolved with a string once the capabilities
|
* Returns a Promise that will be resolved with a string once the capabilities
|
||||||
* of the h264 decoder have been determined.
|
* of the h264 decoder have been determined.
|
||||||
|
|
|
@ -175,6 +175,7 @@ struct TextureFactoryIdentifier
|
||||||
bool mSupportsPartialUploads;
|
bool mSupportsPartialUploads;
|
||||||
bool mSupportsComponentAlpha;
|
bool mSupportsComponentAlpha;
|
||||||
bool mSupportsBackdropCopyForComponentAlpha;
|
bool mSupportsBackdropCopyForComponentAlpha;
|
||||||
|
bool mUsingAdvancedLayers;
|
||||||
SyncHandle mSyncHandle;
|
SyncHandle mSyncHandle;
|
||||||
|
|
||||||
explicit TextureFactoryIdentifier(LayersBackend aLayersBackend = LayersBackend::LAYERS_NONE,
|
explicit TextureFactoryIdentifier(LayersBackend aLayersBackend = LayersBackend::LAYERS_NONE,
|
||||||
|
@ -193,6 +194,7 @@ struct TextureFactoryIdentifier
|
||||||
, mSupportsPartialUploads(aSupportsPartialUploads)
|
, mSupportsPartialUploads(aSupportsPartialUploads)
|
||||||
, mSupportsComponentAlpha(aSupportsComponentAlpha)
|
, mSupportsComponentAlpha(aSupportsComponentAlpha)
|
||||||
, mSupportsBackdropCopyForComponentAlpha(true)
|
, mSupportsBackdropCopyForComponentAlpha(true)
|
||||||
|
, mUsingAdvancedLayers(false)
|
||||||
, mSyncHandle(aSyncHandle)
|
, mSyncHandle(aSyncHandle)
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
|
|
@ -304,6 +304,7 @@ struct ParamTraits<mozilla::layers::TextureFactoryIdentifier>
|
||||||
WriteParam(aMsg, aParam.mSupportsPartialUploads);
|
WriteParam(aMsg, aParam.mSupportsPartialUploads);
|
||||||
WriteParam(aMsg, aParam.mSupportsComponentAlpha);
|
WriteParam(aMsg, aParam.mSupportsComponentAlpha);
|
||||||
WriteParam(aMsg, aParam.mSupportsBackdropCopyForComponentAlpha);
|
WriteParam(aMsg, aParam.mSupportsBackdropCopyForComponentAlpha);
|
||||||
|
WriteParam(aMsg, aParam.mUsingAdvancedLayers);
|
||||||
WriteParam(aMsg, aParam.mSyncHandle);
|
WriteParam(aMsg, aParam.mSyncHandle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -317,6 +318,7 @@ struct ParamTraits<mozilla::layers::TextureFactoryIdentifier>
|
||||||
ReadParam(aMsg, aIter, &aResult->mSupportsPartialUploads) &&
|
ReadParam(aMsg, aIter, &aResult->mSupportsPartialUploads) &&
|
||||||
ReadParam(aMsg, aIter, &aResult->mSupportsComponentAlpha) &&
|
ReadParam(aMsg, aIter, &aResult->mSupportsComponentAlpha) &&
|
||||||
ReadParam(aMsg, aIter, &aResult->mSupportsBackdropCopyForComponentAlpha) &&
|
ReadParam(aMsg, aIter, &aResult->mSupportsBackdropCopyForComponentAlpha) &&
|
||||||
|
ReadParam(aMsg, aIter, &aResult->mUsingAdvancedLayers) &&
|
||||||
ReadParam(aMsg, aIter, &aResult->mSyncHandle);
|
ReadParam(aMsg, aIter, &aResult->mSyncHandle);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -183,6 +183,7 @@ LayerManagerMLGPU::GetTextureFactoryIdentifier()
|
||||||
ident = mDevice->GetTextureFactoryIdentifier();
|
ident = mDevice->GetTextureFactoryIdentifier();
|
||||||
}
|
}
|
||||||
ident.mSupportsBackdropCopyForComponentAlpha = SupportsBackdropCopyForComponentAlpha();
|
ident.mSupportsBackdropCopyForComponentAlpha = SupportsBackdropCopyForComponentAlpha();
|
||||||
|
ident.mUsingAdvancedLayers = true;
|
||||||
return ident;
|
return ident;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -393,16 +393,22 @@ var snapshotFormatters = {
|
||||||
}
|
}
|
||||||
|
|
||||||
// graphics-features-tbody
|
// graphics-features-tbody
|
||||||
|
let compositor = "";
|
||||||
let compositor = data.windowLayerManagerRemote
|
if (data.windowLayerManagerRemote) {
|
||||||
? data.windowLayerManagerType
|
compositor = data.windowLayerManagerType;
|
||||||
: "BasicLayers (" + strings.GetStringFromName("mainThreadNoOMTC") + ")";
|
if (data.windowUsingAdvancedLayers) {
|
||||||
|
compositor += " (Advanced Layers)";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
compositor = "BasicLayers (" + strings.GetStringFromName("mainThreadNoOMTC") + ")";
|
||||||
|
}
|
||||||
addRow("features", "compositing", compositor);
|
addRow("features", "compositing", compositor);
|
||||||
delete data.windowLayerManagerRemote;
|
delete data.windowLayerManagerRemote;
|
||||||
delete data.windowLayerManagerType;
|
delete data.windowLayerManagerType;
|
||||||
delete data.numTotalWindows;
|
delete data.numTotalWindows;
|
||||||
delete data.numAcceleratedWindows;
|
delete data.numAcceleratedWindows;
|
||||||
delete data.numAcceleratedWindowsMessage;
|
delete data.numAcceleratedWindowsMessage;
|
||||||
|
delete data.windowUsingAdvancedLayers;
|
||||||
|
|
||||||
addRow("features", "asyncPanZoom",
|
addRow("features", "asyncPanZoom",
|
||||||
apzInfo.length
|
apzInfo.length
|
||||||
|
|
|
@ -365,6 +365,7 @@ var dataProviders = {
|
||||||
data.numTotalWindows++;
|
data.numTotalWindows++;
|
||||||
data.windowLayerManagerType = winUtils.layerManagerType;
|
data.windowLayerManagerType = winUtils.layerManagerType;
|
||||||
data.windowLayerManagerRemote = winUtils.layerManagerRemote;
|
data.windowLayerManagerRemote = winUtils.layerManagerRemote;
|
||||||
|
data.windowUsingAdvancedLayers = winUtils.usingAdvancedLayers;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -252,6 +252,9 @@ const SNAPSHOT_SCHEMA = {
|
||||||
windowLayerManagerRemote: {
|
windowLayerManagerRemote: {
|
||||||
type: "boolean",
|
type: "boolean",
|
||||||
},
|
},
|
||||||
|
windowUsingAdvancedLayers: {
|
||||||
|
type: "boolean",
|
||||||
|
},
|
||||||
currentAudioBackend: {
|
currentAudioBackend: {
|
||||||
type: "string",
|
type: "string",
|
||||||
},
|
},
|
||||||
|
|
Загрузка…
Ссылка в новой задаче