If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Distorted images in v57 nightly

RESOLVED FIXED in Firefox 57

Status

()

Core
Graphics
P1
normal
RESOLVED FIXED
a month ago
14 days ago

People

(Reporter: sid, Assigned: dvander)

Tracking

57 Branch
mozilla57
Points:
---

Firefox Tracking Flags

(firefox57 fixed)

Details

(Whiteboard: [gfx-noted])

Attachments

(5 attachments)

(Reporter)

Description

a month ago
Created attachment 8904156 [details]
Firefox v57 nightly - Distorted images.png

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0
Build ID: 20170903220032

Steps to reproduce:

Browse to https://qz.com/latest/
Scroll to about half way in the page
Move your mouse from one story to another


Actual results:

The small images next to the story become distorted with strange banding effect




Expected results:

Images should not be distorted, which I'm moving the mouse or scrolling  a web page.

Additional information:
* Sometimes scrolling up and down the page makes the image reappear as normal again.
* From what I can tell there is some sort of mouse hover effect on the qz.com site, which seems to trigger this behavior. 
* QZ.com is the worst affected but I see similar behavior on Ars Technica article pages and on Plural Sight training videos. 
* This is happening on two completely different machines that are not synced via FF account and have different GPU hardware.

Updated

a month ago
Component: Untriaged → Graphics
Product: Firefox → Core

Comment 1

a month ago
@sid,

Could you test this with setting layers.mlgpu.dev-enabled = false in about:config (need to restart browser)?
Flags: needinfo?(ssidpat)
(Reporter)

Comment 2

a month ago
I can't reproduce the problem after setting layers.mlgpu.dev-enabled=false.

It was set to true by default for me and if I set it back to true and restart the browser the problem returns on the same site.
Flags: needinfo?(ssidpat)

Comment 3

a month ago
@sid,

Thanks, your confirmation,

Additionally, 
Could you attach the result of about:support in the default setting here?
Blocks: 1375743
Flags: needinfo?(ssidpat)
(Reporter)

Comment 4

a month ago
Created attachment 8904205 [details]
Firefox Nightly v57 Bug 1396507 - about-support.txt

Output from about:support attached as text file.
Flags: needinfo?(ssidpat)
(Assignee)

Comment 5

a month ago
This looks like an Advanced Layers bug.
Assignee: nobody → dvander
Whiteboard: [gfx-noted]
(Assignee)

Updated

a month ago
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
(Assignee)

Comment 6

a month ago
The bug is that an ImageLayer has a visible region starting at (0, -1). The old compositor ignores the visible region of images (except for occlusion culling), and uses the picture rect to draw. We already clamp visible regions to picture rects in other cases, so we might as well do it for ImageLayers too.

The reason this resulted in such whacky rendering is because we unconditionally call DecomposeIntoNoRepeatRects. The old compositor does this too, but never with a negative origin. The negative origin completely messed up the texture coordinates. There's no reason to call this function here, so I'll add a patch to fix that as well.
(Assignee)

Comment 7

a month ago
Created attachment 8907190 [details] [diff] [review]
part 1, fix image visible region

Clamp the visible region like we already do for video.
Attachment #8907190 - Flags: review?(matt.woodrow)
(Assignee)

Comment 8

a month ago
Created attachment 8907191 [details] [diff] [review]
part 2, clean-up

This is a straight-up refactoring, so we're not passing a million arguments into a bunch of functions. Instead there's a new struct to carry texture drawing information around. It'll be extended with a new field in the next patch.
Attachment #8907191 - Flags: review?(matt.woodrow)
(Assignee)

Comment 9

a month ago
Created attachment 8907192 [details] [diff] [review]
part 3, relax no-repeat rects

This drops the call to DecomposeIntoNoRepeatRects unless needed by its caller. Only PaintedLayers with MayResample() == true will require it. For PaintedLayers with MayResample() == false, there is a new SamplerMode::LinearRepeat so we can paint the entire texture with a single instance/draw call.
Attachment #8907192 - Flags: review?(matt.woodrow)
Attachment #8907190 - Flags: review?(matt.woodrow) → review+
Attachment #8907191 - Flags: review?(matt.woodrow) → review+
Attachment #8907192 - Flags: review?(matt.woodrow) → review+
status-firefox57: --- → affected
Priority: -- → P1

Comment 10

a month ago
Pushed by danderson@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/8bec33a87cc7
Clamp the visible region of ImageLayers to the picture rect. (bug 1396507 part 1, r=mattwoodrow)
https://hg.mozilla.org/integration/mozilla-inbound/rev/44c703889755
Clean up how textured regions are added to draw calls. (bug 1396507 part 2, r=mattwoodrow)
https://hg.mozilla.org/integration/mozilla-inbound/rev/400e455a06da
Bypass DecomposeIntoNoRepeatRects when possible. (bug 1396507 part 3, r=mattwoodrow)
https://hg.mozilla.org/mozilla-central/rev/8bec33a87cc7
https://hg.mozilla.org/mozilla-central/rev/44c703889755
https://hg.mozilla.org/mozilla-central/rev/400e455a06da
Status: ASSIGNED → RESOLVED
Last Resolved: a month ago
status-firefox57: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
(Assignee)

Updated

28 days ago
Duplicate of this bug: 1387281
See Also: → bug 1392076
You need to log in before you can comment on or make changes to this bug.