Closed Bug 1687124 Opened 3 years ago Closed 3 years ago

tab bar rendering broken (blurry font, overlapping tabs, background issues) with WebRender enabled

Categories

(Core :: Graphics: WebRender, defect)

defect

Tracking

()

RESOLVED FIXED
87 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox84 --- disabled
firefox85 --- disabled
firefox86 + fixed
firefox87 --- fixed

People

(Reporter: aryx, Assigned: mattwoodrow)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(7 files)

Attached image screenshot of tab bar

Firefox 86.0a1 20210116092804 on Windows 8.1

The tab bar is broken in one of my Nightly profiles (different graphic settings, more below): the text looks blurry, tabs are drawn overlapping and the background can have the wrong color.

Bisection points to bug 1684170 as regressor. Initially, the profile wasn't affected by the issue with a build after it landed (20210115125655).

When the issue hit the first time, there was also a crash in the background (got notification bar to submit it 10 minutes later): bp-589319e2-4cb6-42ff-809c-9df430210116

Differences in about:support between working and broken builds:

Compositing: Basic => WebRender (Software)
WEBRENDER_PARTIAL: (missing) => 'available by default'

WEBRENDER_SOFTWARE: 'available by default' and 'disabled by env: Overriden by qualified hardware' => 'available by default'

WEBGPU: 'disabled by default: Disabled by default' and 'unavailable-no-webrender by runtime: WebGPU can't present without WebRender' => 'disabled by default: Disabled by default'

By default, Nightly profiles on this machine have "Compositing: WebRender" and I don't know why this one hasn't.

Flags: needinfo?(aosmond)

layers.acceleration.disabled was set to true for unknown reasons.

Confirming I'm seeing a broken tab-bar on Nightly 86.0a1 (2021-01-16) (32-bit) .

I will note that I am NOT seeing the issue, in "Safe mode".

What differs between the current 'Safe-mode' and the live Nightly Build?

Could you do a mozregression with gfx.webrender.all = true and gfx.webrender.software = true? My change was just enabling SW-WR for those getting basic, rather than causing the bug itself in SW-WR.

Flags: needinfo?(aosmond) → needinfo?(aryx.bugmail)
See Also: → 1687170

Tracking the crash separately in bug 1687170.

No longer blocks: sw-wr-stability

(In reply to alexf_ba124 from comment #6)

I will note that I am NOT seeing the issue, in "Safe mode".

What differs between the current 'Safe-mode' and the live Nightly Build?

It will disable Software WebRender in safe mode right now. Eventually Software WebRender will be the safe mode default, but obviously it isn't ready yet :).

Could you do a mozregression with gfx.webrender.all = true and gfx.webrender.software = true?

This is insufficient to reproduce the issue - layers.acceleration.disabled also needs to be set to true. And with that setting Nightly remains in "Compositing: Basic" mode until last Friday.

Flags: needinfo?(aryx.bugmail)

(In reply to Sebastian Hengst [:aryx] (needinfo on intermittent or backout) from comment #10)

Could you do a mozregression with gfx.webrender.all = true and gfx.webrender.software = true?

This is insufficient to reproduce the issue - layers.acceleration.disabled also needs to be set to true. And with that setting Nightly remains in "Compositing: Basic" mode until last Friday.

gfx.webrender.software = true + gfx.webrender.all = true should give you WebRender Software regardless of layers.acceleration.disabled.

(In reply to Andrew Osmond [:aosmond] from comment #11)

(In reply to Sebastian Hengst [:aryx] (needinfo on intermittent or backout) from comment #10)

Could you do a mozregression with gfx.webrender.all = true and gfx.webrender.software = true?

This is insufficient to reproduce the issue - layers.acceleration.disabled also needs to be set to true. And with that setting Nightly remains in "Compositing: Basic" mode until last Friday.

gfx.webrender.software = true + gfx.webrender.all = true should give you WebRender Software regardless of layers.acceleration.disabled.

Ah I see in November it used to work differently:

https://searchfox.org/mozilla-central/diff/ccd859ffae1fd39629ea022d94d6f1dcbc90406c/gfx/config/gfxConfigManager.cpp#123

If the issue was introduced before November (or was always there) you may need layers.acceleration.disabled = true. Good call.

The issue looks like what you'd get if the sw-wr compositor didn't clear the background before compositing. This is necessary in transparent windows (or at least in the transparent parts of them) so that the content doesn't accumulate across frames.

(In reply to Markus Stange [:mstange] from comment #13)

The issue looks like what you'd get if the sw-wr compositor didn't clear the background before compositing. This is necessary in transparent windows (or at least in the transparent parts of them) so that the content doesn't accumulate across frames.

I think that makes sense. WebRender itself only issues an explicit clear command when not using a 'native' compositor, and trusts that native compositor implementations handle getting a clean slate at the start of each frame.

RenderCompositor(D3D11)SWGL will need to implement their own clearing.

Tried bisection again, issue seems to have been always around (and up to 2020-06 not browser chrome is missing).

I have set :-
gfx.webrender.all = false
gfx.webrender.force-disabled = true
gfx.webrender.software = false
gfx.webrender.software.d3d11 = false ( D3D 11 isn't I think supported on Windows 7)
sanity-test.webrender.force-disabled = true

Also:-
layers.acceleration.disabled = true
layers.advanced.basic-layer.enabled = true

Which cleared the glitches for me at present, with the apparent penalty of a slightly less responsive UI.

I hope this helps determine which component might have glitched.

This doesn't need to be release tracking. It is disabled in beta/release.

See Also: → 1674473
See Also: → 1686800
Assignee: nobody → matt.woodrow
Status: NEW → ASSIGNED
Pushed by mwoodrow@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b9ca229672d5
Make SwCompositor compute the set of opaque rectangles, and forward this to the RenderCompositor. r=gw,lsalzman
https://hg.mozilla.org/integration/autoland/rev/27de9357456e
Make RenderCompositorSWGL clear the non-opaque dirty areas. r=lsalzman
https://hg.mozilla.org/integration/autoland/rev/8832f33fa266
Pass tile valid rect into invalidate_tile, so that this is available in time for begin_compositing. r=gw

Backed out 3 changesets (bug 1687124) for webrender_bindings related failure.

Push with failure: https://treeherder.mozilla.org/jobs?repo=autoland&group_state=expanded&selectedTaskRun=X6yw5ZirShS3NuyfyZMHwg.0&fromchange=0a80b9cb87ba29fdd6e230e362fbc051e4bb2524&searchStr=linux%2Cx64%2Copt%2Cc%2Fc%2B%2B%2Cchecks%2Csource-test-clang-non-unified%2Cnon-unified&tochange=7c9d7864a9600e86e3a3ce4d559be034c8c00a0f

Backout link: https://hg.mozilla.org/integration/autoland/rev/7c9d7864a9600e86e3a3ce4d559be034c8c00a0f

Failure log: https://treeherder.mozilla.org/logviewer?job_id=327915028&repo=autoland&lineNumber=7928

[task 2021-01-27T01:54:41.434Z] 43:41.54 /builds/worker/fetches/clang/bin/clang++ -std=gnu++17 -o /dev/null -c -I/builds/worker/checkouts/gecko/obj-x86_64-pc-linux-gnu/dist/stl_wrappers -I/builds/worker/checkouts/gecko/obj-x86_64-pc-linux-gnu/dist/system_wrappers -include /builds/worker/checkouts/gecko/config/gcc_hidden.h -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fstack-clash-protection -ftrivial-auto-var-init=pattern -DDEBUG=1 -DOS_POSIX=1 -DOS_LINUX=1 -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DSTATIC_EXPORTABLE_JS_API -I/builds/worker/checkouts/gecko/gfx/webrender_bindings -I/builds/worker/checkouts/gecko/obj-x86_64-pc-linux-gnu/gfx/webrender_bindings -I/builds/worker/checkouts/gecko/obj-x86_64-pc-linux-gnu/ipc/ipdl/_ipdlheaders -I/builds/worker/checkouts/gecko/ipc/chromium/src -I/builds/worker/checkouts/gecko/ipc/glue -I/builds/worker/checkouts/gecko/obj-x86_64-pc-linux-gnu/dist/include -I/builds/worker/checkouts/gecko/obj-x86_64-pc-linux-gnu/dist/include/nspr -I/builds/worker/checkouts/gecko/obj-x86_64-pc-linux-gnu/dist/include/nss -fPIC -DMOZILLA_CLIENT -include /builds/worker/checkouts/gecko/obj-x86_64-pc-linux-gnu/mozilla-config.h -Qunused-arguments -Qunused-arguments -Wall -Wbitfield-enum-conversion -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wempty-init-stmt -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wno-range-loop-analysis -Wc++2a-compat -Wcomma -Wimplicit-fallthrough -Wunused-function -Wunused-variable -Wstring-conversion -Wtautological-overlap-compare -Wtautological-unsigned-enum-zero-compare -Wtautological-unsigned-zero-compare -Wno-error=tautological-type-limit-compare -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=backend-plugin -Wno-error=return-std-move -Wno-error=atomic-alignment -Wno-error=deprecated-copy -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Wno-psabi -Wno-unknown-warning-option -fno-sized-deallocation -fno-aligned-new -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -g -Os -fno-omit-frame-pointer -funwind-tables -I/builds/worker/checkouts/gecko/obj-x86_64-pc-linux-gnu/dist/include/cairo -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/builds/worker/checkouts/gecko/widget/gtk/compat-gtk3 -pthread -I/usr/include/gtk-3.0/unix-print -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/cairo -I/usr/include/libdrm -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/gio-unix-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/builds/worker/checkouts/gecko/obj-x86_64-pc-linux-gnu/dist/include/cairo -fexperimental-new-pass-manager -ferror-limit=0 /builds/worker/checkouts/gecko/gfx/webrender_bindings/RenderDMABUFTextureHost.cpp -fsyntax-only
[task 2021-01-27T01:54:42.593Z] /builds/worker/checkouts/gecko/gfx/webrender_bindings/RenderCompositorSWGL.cpp:125:10: error: unknown type name 'DrawTarget'; did you mean 'gfx::DrawTarget'?
[task 2021-01-27T01:54:42.593Z]   RefPtr<DrawTarget> dt = Factory::CreateDrawTargetForData(
[task 2021-01-27T01:54:42.593Z]          ^~~~~~~~~~
[task 2021-01-27T01:54:42.593Z]          gfx::DrawTarget
[task 2021-01-27T01:54:42.593Z] /builds/worker/checkouts/gecko/obj-x86_64-pc-linux-gnu/dist/include/mozilla/widget/CompositorWidget.h:34:7: note: 'gfx::DrawTarget' declared here
[task 2021-01-27T01:54:42.593Z] class DrawTarget;
[task 2021-01-27T01:54:42.593Z]       ^
[task 2021-01-27T01:54:42.604Z] /builds/worker/checkouts/gecko/gfx/webrender_bindings/RenderCompositorSWGL.cpp:125:27: error: use of undeclared identifier 'Factory'; did you mean 'gfx::Factory'?
[task 2021-01-27T01:54:42.604Z]   RefPtr<DrawTarget> dt = Factory::CreateDrawTargetForData(
[task 2021-01-27T01:54:42.604Z]                           ^~~~~~~
[task 2021-01-27T01:54:42.605Z]                           gfx::Factory
[task 2021-01-27T01:54:42.605Z] /builds/worker/checkouts/gecko/obj-x86_64-pc-linux-gnu/dist/include/mozilla/gfx/2D.h:1715:17: note: 'gfx::Factory' declared here
[task 2021-01-27T01:54:42.605Z] class GFX2D_API Factory {
[task 2021-01-27T01:54:42.605Z]                 ^
[task 2021-01-27T01:54:42.605Z] /builds/worker/checkouts/gecko/gfx/webrender_bindings/RenderCompositorSWGL.cpp:126:7: error: 'BackendType' is not a class, namespace, or enumeration
[task 2021-01-27T01:54:42.605Z]       BackendType::SKIA, mMappedData, bounds.Size().ToUnknownSize(),
[task 2021-01-27T01:54:42.605Z]       ^
[task 2021-01-27T01:54:42.606Z] /builds/worker/checkouts/gecko/gfx/webrender_bindings/RenderCompositorSWGL.h:44:28: note: 'BackendType' declared here
[task 2021-01-27T01:54:42.606Z]   layers::WebRenderBackend BackendType() const override {
[task 2021-01-27T01:54:42.606Z]                            ^
[task 2021-01-27T01:54:42.618Z] /builds/worker/checkouts/gecko/gfx/webrender_bindings/RenderCompositorSWGL.cpp:127:22: error: use of undeclared identifier 'SurfaceFormat'; did you mean 'gfx::SurfaceFormat'?
[task 2021-01-27T01:54:42.619Z]       mMappedStride, SurfaceFormat::B8G8R8A8, false);
[task 2021-01-27T01:54:42.620Z]                      ^~~~~~~~~~~~~
[task 2021-01-27T01:54:42.621Z]                      gfx::SurfaceFormat
[task 2021-01-27T01:54:42.622Z] /builds/worker/checkouts/gecko/obj-x86_64-pc-linux-gnu/dist/include/mozilla/gfx/Types.h:47:12: note: 'gfx::SurfaceFormat' declared here
[task 2021-01-27T01:54:42.623Z] enum class SurfaceFormat : int8_t {
[task 2021-01-27T01:54:42.623Z]            ^
[task 2021-01-27T01:54:42.776Z] 4 errors generated.
Flags: needinfo?(matt.woodrow)
Pushed by mwoodrow@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/54c622bebe46
Make SwCompositor compute the set of opaque rectangles, and forward this to the RenderCompositor. r=gw,lsalzman
https://hg.mozilla.org/integration/autoland/rev/ae0fbb28e057
Make RenderCompositorSWGL clear the non-opaque dirty areas. r=lsalzman
https://hg.mozilla.org/integration/autoland/rev/8e063535c9e8
Pass tile valid rect into invalidate_tile, so that this is available in time for begin_compositing. r=gw
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch
Flags: needinfo?(matt.woodrow)

Comment on attachment 9198543 [details]
Bug 1687124 - Make SwCompositor compute the set of opaque rectangles, and forward this to the RenderCompositor. r?gw!,lsalzman!

Beta/Release Uplift Approval Request

  • User impact if declined: Blurred glass areas for Win 7 users with software WebRender
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Just clears out the transparent region, clearing too much would just be a slight performance issue, not a correctness one.
  • String changes made/needed:
Attachment #9198543 - Flags: approval-mozilla-beta?
Attachment #9198544 - Flags: approval-mozilla-beta?
Attachment #9198545 - Flags: approval-mozilla-beta?
Blocks: 1689245

Comment on attachment 9198543 [details]
Bug 1687124 - Make SwCompositor compute the set of opaque rectangles, and forward this to the RenderCompositor. r?gw!,lsalzman!

Low risk, Approved for 86 beta 3, thanks.

Attachment #9198543 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9198544 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9198545 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: