Closed Bug 1792527 Opened 2 years ago Closed 2 years ago

image-rendering: pixelated/crisp-edges/smooth does not work consistently with Software Webrender

Categories

(Core :: Graphics: WebRender, defect)

Firefox 107
defect

Tracking

()

VERIFIED FIXED
107 Branch
Tracking Status
firefox107 --- verified

People

(Reporter: ke5trel, Assigned: lsalzman)

References

(Blocks 2 open bugs)

Details

Attachments

(2 files)

STR:

  1. Start with gfx.webrender.software = true so that "WebRender (Software)" is used.
  2. Visit https://www.w3schools.com/cssref//tryit.asp?filename=trycss3_image-rendering.

All the images are rendered smooth despite some of them being marked as pixelated and crisp-edges. It seems as though the first image-rendering usage determines the rendering method for the entire document. Scrolling the page may reveal images without smoothing but resizing the page causes it to be applied.

Works reliably with HW-WR but not SW-WR. Not a regression, occurs since introduction of SW-WR.

Flags: needinfo?(lsalzman)
Flags: needinfo?(lsalzman)

If an external image shows up multiple times while using a different image rendering
setting on each instance, we can erroneously call handler.lock() for each instance in
parallel, thus defaulting to the last image rendering setting supplied for all instances
in that batch.

To work around this, we get rid of the concept of having RenderTextureHosts maintain and
set the image rendering state, which results in a nice simplification. Then, when we go
to actually bind an external image inside WebRender, we set the image rendering state
at that point, so that regardless of how many instances of an external image are locked
simultaneously, we always use the correct image rendering setting for a batch.

Assignee: nobody → lsalzman
Status: NEW → ASSIGNED
Pushed by lsalzman@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b1ded2411f3d
Explicitly bind mip filter for external textures inside WebRender. r=gw
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 107 Branch
QA Whiteboard: [qa-107b-p2]

I managed to reproduce this issue on a 2022-09-27 Nightly build on Ubuntu 22 using the STR and URL from the Description. Verified as fixed on Firefox 107.0b3(build ID: 20221020202724) and Nightly 108.0a1(build ID: 20221020215126) on Ubuntu 22, macOS 12, Windows 10.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-107b-p2]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: