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:
David Anderson 2017-06-22 21:12:20 -07:00
Родитель 0505938414
Коммит 52d5447f23
8 изменённых файлов: 44 добавлений и 4 удалений

Просмотреть файл

@ -2330,6 +2330,26 @@ nsDOMWindowUtils::GetLayerManagerRemote(bool* retval)
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
nsDOMWindowUtils::GetSupportsHardwareH264Decoding(JS::MutableHandle<JS::Value> aPromise)
{

Просмотреть файл

@ -1416,6 +1416,11 @@ interface nsIDOMWindowUtils : nsISupports {
*/
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
* of the h264 decoder have been determined.

Просмотреть файл

@ -175,6 +175,7 @@ struct TextureFactoryIdentifier
bool mSupportsPartialUploads;
bool mSupportsComponentAlpha;
bool mSupportsBackdropCopyForComponentAlpha;
bool mUsingAdvancedLayers;
SyncHandle mSyncHandle;
explicit TextureFactoryIdentifier(LayersBackend aLayersBackend = LayersBackend::LAYERS_NONE,
@ -193,6 +194,7 @@ struct TextureFactoryIdentifier
, mSupportsPartialUploads(aSupportsPartialUploads)
, mSupportsComponentAlpha(aSupportsComponentAlpha)
, mSupportsBackdropCopyForComponentAlpha(true)
, mUsingAdvancedLayers(false)
, mSyncHandle(aSyncHandle)
{}
};

Просмотреть файл

@ -304,6 +304,7 @@ struct ParamTraits<mozilla::layers::TextureFactoryIdentifier>
WriteParam(aMsg, aParam.mSupportsPartialUploads);
WriteParam(aMsg, aParam.mSupportsComponentAlpha);
WriteParam(aMsg, aParam.mSupportsBackdropCopyForComponentAlpha);
WriteParam(aMsg, aParam.mUsingAdvancedLayers);
WriteParam(aMsg, aParam.mSyncHandle);
}
@ -317,6 +318,7 @@ struct ParamTraits<mozilla::layers::TextureFactoryIdentifier>
ReadParam(aMsg, aIter, &aResult->mSupportsPartialUploads) &&
ReadParam(aMsg, aIter, &aResult->mSupportsComponentAlpha) &&
ReadParam(aMsg, aIter, &aResult->mSupportsBackdropCopyForComponentAlpha) &&
ReadParam(aMsg, aIter, &aResult->mUsingAdvancedLayers) &&
ReadParam(aMsg, aIter, &aResult->mSyncHandle);
return result;
}

Просмотреть файл

@ -183,6 +183,7 @@ LayerManagerMLGPU::GetTextureFactoryIdentifier()
ident = mDevice->GetTextureFactoryIdentifier();
}
ident.mSupportsBackdropCopyForComponentAlpha = SupportsBackdropCopyForComponentAlpha();
ident.mUsingAdvancedLayers = true;
return ident;
}

Просмотреть файл

@ -393,16 +393,22 @@ var snapshotFormatters = {
}
// graphics-features-tbody
let compositor = data.windowLayerManagerRemote
? data.windowLayerManagerType
: "BasicLayers (" + strings.GetStringFromName("mainThreadNoOMTC") + ")";
let compositor = "";
if (data.windowLayerManagerRemote) {
compositor = data.windowLayerManagerType;
if (data.windowUsingAdvancedLayers) {
compositor += " (Advanced Layers)";
}
} else {
compositor = "BasicLayers (" + strings.GetStringFromName("mainThreadNoOMTC") + ")";
}
addRow("features", "compositing", compositor);
delete data.windowLayerManagerRemote;
delete data.windowLayerManagerType;
delete data.numTotalWindows;
delete data.numAcceleratedWindows;
delete data.numAcceleratedWindowsMessage;
delete data.windowUsingAdvancedLayers;
addRow("features", "asyncPanZoom",
apzInfo.length

Просмотреть файл

@ -365,6 +365,7 @@ var dataProviders = {
data.numTotalWindows++;
data.windowLayerManagerType = winUtils.layerManagerType;
data.windowLayerManagerRemote = winUtils.layerManagerRemote;
data.windowUsingAdvancedLayers = winUtils.usingAdvancedLayers;
} catch (e) {
continue;
}

Просмотреть файл

@ -252,6 +252,9 @@ const SNAPSHOT_SCHEMA = {
windowLayerManagerRemote: {
type: "boolean",
},
windowUsingAdvancedLayers: {
type: "boolean",
},
currentAudioBackend: {
type: "string",
},