Bug 1657498 - report Software WebRender in about:support. r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D87122
This commit is contained in:
Lee Salzman 2020-08-14 22:30:05 +00:00
Родитель fef5d21eae
Коммит 336b9f7a61
3 изменённых файлов: 13 добавлений и 5 удалений

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

@ -14,6 +14,7 @@
#include "mozilla/StaticPrefs_layers.h"
#include "mozilla/dom/BrowserChild.h"
#include "mozilla/gfx/DrawEventRecorder.h"
#include "mozilla/gfx/gfxVars.h"
#include "mozilla/layers/CompositorBridgeChild.h"
#include "mozilla/layers/StackingContextHelper.h"
#include "mozilla/layers/TextureClient.h"
@ -138,6 +139,14 @@ CompositorBridgeChild* WebRenderLayerManager::GetCompositorBridgeChild() {
return WrBridge()->GetCompositorBridgeChild();
}
void WebRenderLayerManager::GetBackendName(nsAString& name) {
if (gfx::gfxVars::UseSoftwareWebRender()) {
name.AssignLiteral("WebRender (Software)");
} else {
name.AssignLiteral("WebRender");
}
}
uint32_t WebRenderLayerManager::StartFrameTimeRecording(int32_t aBufferSize) {
CompositorBridgeChild* renderer = GetCompositorBridgeChild();
if (renderer) {

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

@ -81,9 +81,7 @@ class WebRenderLayerManager final : public LayerManager {
EndTransactionFlags aFlags = END_DEFAULT) override;
LayersBackend GetBackendType() override { return LayersBackend::LAYERS_WR; }
void GetBackendName(nsAString& name) override {
name.AssignLiteral("WebRender");
}
void GetBackendName(nsAString& name) override;
const char* Name() const override { return "WebRender"; }
void SetRoot(Layer* aLayer) override;

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

@ -496,14 +496,15 @@ function BuildConditionSandbox(aURL) {
g.windowUtils.layerManagerType == "Direct3D 9";
sandbox.layersOpenGL =
g.windowUtils.layerManagerType == "OpenGL";
sandbox.swgl =
g.windowUtils.layerManagerType == "WebRender (Software)";
sandbox.webrender =
g.windowUtils.layerManagerType == "WebRender";
g.windowUtils.layerManagerType == "WebRender" || sandbox.swgl;
sandbox.layersOMTC =
g.windowUtils.layerManagerRemote == true;
sandbox.advancedLayers =
g.windowUtils.usingAdvancedLayers == true;
sandbox.layerChecksEnabled = !sandbox.webrender;
sandbox.swgl = sandbox.webrender && prefs.getBoolPref("gfx.webrender.software", false);
sandbox.retainedDisplayList =
prefs.getBoolPref("layout.display-list.retain");