Closed Bug 1431745 Opened 6 years ago Closed 2 years ago

CSS 3D panoramic cube not displayed properly when HW acceleration is disabled

Categories

(Core :: Graphics, defect)

57 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1725388
Webcompat Priority P3

People

(Reporter: francois, Assigned: jnicol)

References

Details

(Keywords: correctness)

Attachments

(2 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36

Steps to reproduce:

On Firefox 57.0.4,
1. turn "Hardware Acceleration" OFF and restart Firefox
2. open page: http://youriguide.com/sample-full
3. drag the panorama (left side of the screen) in any direction (horizontally, vertically, diagonally)


Actual results:

Attached is a screenshot of the cubic panorama viewer where 6 image tiles are placed on sides of a cube and 3D rotation is applied on mouse drag to rotate the cube. 3D transforms are implemented through CSS 3D styles.

While dragging mouse and when letting go of mouse,
  - some panoramic tiles do not display their image.
  - some panoramic tiles display a messed up image.


Expected results:

The panorama should display a continuous and complete image, that is, all the cube tiles should have images displayed properly.
Component: Untriaged → Graphics
Product: Firefox → Core
I think this is duplication of Bug 1431778 which was reported by the same reporter.
This is not exactly the same issue as with https://bugzilla.mozilla.org/show_bug.cgi?id=1431778.
It occurs on Mac Firefox when hardware acceleration is disabled.
I sort of understand what the problem is here. The room is implemented as a cube with 6 faces each with an image, and these get rotated around. At certain angles the bug occurs. At these angles, a point on one of the faces will be behind the viewport. (ie have a negative z coordinate).

When skia transforms that 3d point in to screen space, it ends up in a very different location than it should be, causing what can be seen in the screenshot. The problem lies in SkMatrix::Persp_pts. The x and y coordinates get multiplied by z. So if on a square, one point has a negative z and the rest positive, that one point will be in the wrong place.

It seems to affect Chrome with hardware accel disabled to an extent, though perhaps not as badly as Firefox.
Assignee: nobody → jnicol
Attached file cube.html
Attached is a testcase reduced from this page.

At rotateX(-68deg) the square is visible, but at rotateX(-69deg) it disappears.
Flags: needinfo?(jan)
Flags: needinfo?(jan)
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Webcompat Priority: --- → ?

Does this still matter given it relies on having HW acceleration disabled?
Is it an issue in software WebRender?

Flags: needinfo?(jnicol)
Webcompat Priority: ? → P3

Disable HWA does not help for me.

It seems to work correctly for me now, both with hardware and software webrender.

Flags: needinfo?(jnicol)

Gnome Xwayland, Debian Testing, Intel
MOZ_DISABLE_CONTENT_SANDBOX=1 mozregression --find-fix --bad 2018-01-10 --good 2021-12-14 --pref gfx.webrender.force-disabled:true layers.acceleration.disabled:true gfx.webrender.force-legacy-layers:true -a https://bug1431745.bmoattachments.org/attachment.cgi?id=8974337

7:31.65 INFO: First good revision: 16fa627201d13b50df1c1be9ea767eb4d68ff0ba
7:31.65 INFO: Last bad revision: 64c0e09f64462ccbbccc18b80e46492683a5c82e
7:31.65 INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=64c0e09f64462ccbbccc18b80e46492683a5c82e&tochange=16fa627201d13b50df1c1be9ea767eb4d68ff0ba

16fa627201d13b50df1c1be9ea767eb4d68ff0ba Andrew Osmond — Bug 1725388 - Remove pref/envvars that can disable WebRender. r=jrmuizel

Optimal fix range :)

Status: ASSIGNED → RESOLVED
Has STR: --- → yes
Closed: 2 years ago
Keywords: correctness
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: