Closed Bug 1609908 Opened 5 years ago Closed 5 years ago

Canvas resize aspect ratio wrong in nightly with webrender

Categories

(Core :: Graphics: CanvasWebGL, defect, P1)

74 Branch
x86_64
Windows 10
defect

Tracking

()

VERIFIED FIXED
mozilla74
Tracking Status
firefox-esr68 --- unaffected
firefox72 --- unaffected
firefox73 --- unaffected
firefox74 --- verified

People

(Reporter: julien_sosthene, Assigned: jgilbert)

References

(Regressed 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0

Steps to reproduce:

Open a webpage with a 3D canvas (WebGL context) on nightly, and resize the page dynamically.

Test page : https://threejs.org/examples/#webgl_materials_standard

(Setup: Nightly on Windows 10, Nvidia RTX 2060 card, And Preview Nightly on Android 10, OnePlus 6)

Actual results:

The content of the canvas, which previously resized correctly, now renders on a streched zone instead of adapting the ratio as it used to.

The size of the canvas is OK, but the rendered portion is stretched. It looks like a size setting problem, or more likely a problem when someone sets the webgl context viewport.

This bug happens on Desktop Nightly and on Preview Nighlty but not on regular stable-branch Firefox.

Expected results:

The aspect ratio of the drawn area should have adapted to the new canvas size.

(See stable Firefox or Chrome to compare)

I could not reproduce this issue - when loading the provided link, I get a crash on the latest Nightly 74.0a1 (Bug 1608311). I'm going to set the component Canvas: WebGL so that someone with more knowledge in this area will take a look over this.

Component: Untriaged → Canvas: WebGL
Product: Firefox → Core

Able to reproduce this issue in Nightly 74.0a1 (2020-01-21), but not Beta 73.0b7 on Windows 10.

Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Unspecified → Windows 10
Hardware: Unspecified → x86_64

Cannot reproduce this issue in a fresh profile in Nightly build 20200121215203.

Attached file prefs.js for impacted profile (deleted) —

For the issue to be reproduced, this prefs.js file needs to be copied into the profile.

The only thing you need from the prefs file is to enable webrender.

Summary: Canvas resize in nightly → Canvas resize aspect ratio wrong in nightly with webrender
Has Regression Range: --- → yes
Assignee: nobody → jgilbert
Flags: needinfo?(jgilbert)
Priority: P2 → P1

Zooming also causes letterboxing, so I suspect a compositing interaction, not a glViewport issue.

We never set mResetLayer = true like we used to, so WebRender thinks it's the same size as ever.

We should write a reftest.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla74

Able to reproduce this issue in Nightly 74.0a1 (2020-01-17). No longer able to reproduce in 74.0a1 (2020-01-24). All tests performed in Windows 10.

Status: RESOLVED → VERIFIED
Regressions: 1686356
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: