Closed Bug 1612620 Opened 6 years ago Closed 5 years ago

"#1 Best Seller" badge on Amazon has blocky points (due to border painting incorrectly), on Fenix on Android with WebRender enabled

Categories

(Core :: Graphics: WebRender, defect, P3)

Unspecified
Android
defect

Tracking

()

VERIFIED FIXED
mozilla75
Tracking Status
firefox-esr68 --- unaffected
firefox73 --- wontfix
firefox74 --- wontfix
firefox75 --- verified

People

(Reporter: dholbert, Assigned: ktaeleman)

References

Details

(Keywords: regression)

Attachments

(4 files, 1 obsolete file)

Attached image screenshot of bug

STR:

  1. Visit an amazon page with a "#1 Best Seller" badge, like this one:
    https://www.amazon.com/gp/product/B07THHQMHM
    Or view this reduced testcase, created by the testcase-reducer addon:
    https://jsfiddle.net/dholbert/yrjpk8c2/

EXPECTED RESULTS:
The right edge of the badge should have a triangular "bite" taken out of it (the top and bottom corners should be pointy).

ACTUAL RESULTS:
The right edge is a weird blocky stair-step.

I get EXPECTED RESULTS in Chrome on Android, in Firefox Beta 68.5 on Android, and in all browsers on Desktop (including in RDM).

I get ACTUAL RESULTS in Fenix (Firefox Preview Nightly) on Android.

I'm filing this as a Layout bug for now, since the corners are drawn using a CSS border. This might be a graphics issue, though (?)

Attachment #9123874 - Attachment description: testcase 1 → testcase 1 (should render as four colorful triangles)

In Fenix, testcase 1 renders as four squares instead of four triangles.

mozregression is a bit broken for geckoview right now (see bug 1612627), but I tracked down a few-day regression range using mozregression -n gve --launch [date].

Regression range:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=63a84cdf&tochange=3d4f93bf

(to track down the range -- the following command produces a run with "expected results" (triangles) on testcase 1:

mozregression -n gve --launch 2019-11-25
0:01.38 INFO: Downloading build from: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/cJtne7SDSkC2YLfcRROJ5g/runs/0/artifacts/public%2Fbuild%2Fgeckoview_example.apk
===== Downloaded 100% =====
0:02.97 INFO: Running autoland build built on 2019-11-26 00:31:37.222000, revision 63a84cdf

And this command produces a run with "actual results" (squares) on testcase 1:

mozregression -n gve --launch 2019-11-27
0:02.09 INFO: Downloading build from: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/Y9QsVImcR7yRU6SNwmt6Gg/runs/0/artifacts/public%2Fbuild%2Fgeckoview_example.apk
===== Downloaded 100% =====
0:04.93 INFO: Running autoland build built on 2019-11-28 00:12:16.661000, revision 3d4f93bf

...and I just used the provided revision IDs to produce a pushlog by hand.

I'm betting the regression here is this change, enabling webrender for my hardware (a Pixel 3):

Wed Nov 27 18:34:59 2019 +0000 dc8e651817f44f9aa760c17f6d37f2b3ca1adf7b Kris Taeleman — Bug 1598477 - Enable Webrender for Pixel 3 and Pixel 3 XL. r=jnicol

Not sure how best to track that dependency. For now, I'm marking this as blocking the wr-android metabug.

Also, for the record -- this works correctly on my linux Nightly with webrender enabled. So it seems to be an Android-specific WebRender bug.

Blocks: wr-android
Component: Layout → Graphics: WebRender
OS: Unspecified → Android
Summary: "#1 Best Seller" badge on Amazon has blocky points, on Fenix (Firefox Nightly on Android) → "#1 Best Seller" badge on Amazon has blocky points, on Fenix on Android with WebRender enabled

(In reply to Daniel Holbert [:dholbert] from comment #5)

I'm betting the regression here is this change, enabling webrender for my hardware (a Pixel 3):

Wed Nov 27 18:34:59 2019 +0000 dc8e651817f44f9aa760c17f6d37f2b3ca1adf7b Kris Taeleman — Bug 1598477 - Enable Webrender for Pixel 3 and Pixel 3 XL. r=jnicol

I confirmed that this was the cause. If I force-disable webrender on my phone (gfx.webrender.force-disabled = true), then I start getting EXPECTED RESULTS.

Summary: "#1 Best Seller" badge on Amazon has blocky points, on Fenix on Android with WebRender enabled → "#1 Best Seller" badge on Amazon has blocky points (due to border painting incorrectly), on Fenix on Android with WebRender enabled

I can reproduce the bug on a Pixel 2 device in a brand new install of Firefox Preview Nightly, too. This makes sense, since WebRender is enabled for both models (Pixel 2 and 3), according to the code that was modified in bug 1598477.

Thanks for the report, testcase, and using mozregression! Very helpful!

I tried mozregression myself using --pref "gfx.webrender.all:true", but unfortunately the bug seems to be present as far back as I can run it without it crashing on startup.

Playing around with the testcase, I can see that border-style: solid; works as intended, but border-style: dashed; and border-style: dotted; both fail: they paint the entire corner segment a single colour (of the anti-clockwise edge), rather than half-and-half. Perhaps an issue in cs-border-segment.glsl, hitting a GLES limitation not present on Desktop GL?

Assignee: nobody → jnicol
Blocks: wr-75-android
No longer blocks: wr-android
Flags: needinfo?(ktaeleman)

I can take a look at this if that's ok with you Jamie.

Assignee: jnicol → ktaeleman
Flags: needinfo?(ktaeleman)

Running this in emulator with webrender enabled shows the 4 triangles as expected, running on device on Pixel 3 XL fails.

On Adreno devices, the default shader behaviour is to use 32bit integers
in the vertex shader and 16bit integers in the fragment shader. This
causes issues in the border shader due to bitshifting with 16 bits. The
fix here is to only shift by 8 bits as the data can be represented in a
16bit integer.

On GLES, the default shader behaviour is to use highp(32bit) integers
in the vertex shader and mediump(16bit) integers in the fragment shader. This
causes issues in the border shader due to bitshifting with 16 bits. The
fix here is to only shift by 8 bits as the data can be represented in a
16bit integer and forcing mediump in the vertex shader as well.

Attachment #9126764 - Attachment is obsolete: true
Pushed by ktaeleman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a2caf09a5e7c Fixing dashed/dotted border issue Android devices with Adreno. r=jnicol
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla75

Is this something we should uplift to Beta for GV74?

Flags: needinfo?(ktaeleman)

No, this is webrender specific and Fenix 4.0+ with GV 74 will have webrender disabled by default, webrender will only be enabled on nightly.

Thanks for double checking!

Flags: needinfo?(ktaeleman)
Regressions: 1616369

Hi, verified as fixed, managed to reproduce on build Firefox Nightly 200204 (Build #20351803) but not with the link for amazon but with https://jsfiddle.net/dholbert/yrjpk8c2/ - please check video.
Devices:

Fixed Build:

  • Firefox Nightly 200319 (Build #20790605) GV: 76.0a1-20200317093640 - Fixed
  • Firefox Nightly 200221 (Build #20520606 ) GV: 75.0a1-20200220093508 - Fixed
Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: