Bug 1561859 - [Wayland] Expose active DRM on Wayland in about:support & telemetry, r=kats

Differential Revision: https://phabricator.services.mozilla.com/D36248

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Martin Stransky 2019-07-01 13:44:14 +00:00
parent 247d96a5f4
commit f785fa7021
4 changed files with 24 additions and 2 deletions

View File

@ -473,6 +473,11 @@ IsWayland:
If true then the Wayland windowing system was in use.
type: boolean
IsWaylandDRM:
description: >
If true then the Wayland DRM backend was in use.
type: boolean
JavaStackTrace:
description: >
Java stack trace, only present on Firefox for Android if we encounter an

View File

@ -20,6 +20,9 @@
#include "GfxInfoX11.h"
#include <gdk/gdkx.h>
#ifdef MOZ_WAYLAND
# include "mozilla/widget/nsWaylandDisplay.h"
#endif
#ifdef DEBUG
bool fire_glxtest_process();
@ -43,6 +46,7 @@ nsresult GfxInfo::Init() {
mIsMesa = false;
mIsAccelerated = true;
mIsWayland = false;
mIsWaylandDRM = false;
return GfxInfoBase::Init();
}
@ -57,6 +61,8 @@ void GfxInfo::AddCrashReportAnnotations() {
CrashReporter::Annotation::AdapterDriverVersion, mDriverVersion);
CrashReporter::AnnotateCrashReport(CrashReporter::Annotation::IsWayland,
mIsWayland);
CrashReporter::AnnotateCrashReport(CrashReporter::Annotation::IsWaylandDRM,
mIsWaylandDRM);
}
void GfxInfo::GetData() {
@ -293,8 +299,12 @@ void GfxInfo::GetData() {
}
mAdapterDescription.Assign(glRenderer);
#ifdef MOZ_WAYLAND
mIsWayland = !GDK_IS_X11_DISPLAY(gdk_display_get_default());
if (mIsWayland) {
mIsWaylandDRM = nsWaylandDisplay::IsDMABufEnabled();
}
#endif
AddCrashReportAnnotations();
}
@ -451,7 +461,11 @@ GfxInfo::GetCleartypeParameters(nsAString& aCleartypeParams) {
NS_IMETHODIMP
GfxInfo::GetWindowProtocol(nsAString& aWindowProtocol) {
if (mIsWayland) {
aWindowProtocol.AssignLiteral("wayland");
if (mIsWaylandDRM) {
aWindowProtocol.AssignLiteral("wayland (drm)");
} else {
aWindowProtocol.AssignLiteral("wayland");
}
return NS_OK;
}

View File

@ -81,6 +81,7 @@ class GfxInfo final : public GfxInfoBase {
bool mIsMesa;
bool mIsAccelerated;
bool mIsWayland;
bool mIsWaylandDRM;
void AddCrashReportAnnotations();
};

View File

@ -335,3 +335,5 @@ if CONFIG['MOZ_ENABLE_D3D10_LAYER']:
DEFINES['MOZ_ENABLE_D3D10_LAYER'] = True
CXXFLAGS += CONFIG['TK_CFLAGS']
if CONFIG['MOZ_WAYLAND']:
CXXFLAGS += CONFIG['MOZ_WAYLAND_CFLAGS']