Closed Bug 1787721 Opened 2 years ago Closed 2 years ago

createPattern appears to have regression in versions >104

Categories

(Core :: Graphics: Canvas2D, defect)

Firefox 106
defect

Tracking

()

RESOLVED FIXED
106 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox-esr102 --- unaffected
firefox104 --- unaffected
firefox105 --- wontfix
firefox106 --- fixed

People

(Reporter: brismith, Assigned: lsalzman)

References

(Blocks 1 open bug, Regression)

Details

Attachments

(2 files)

I am documenting OffscreenCanvas functionality incoming in Fx 105, and I have noticed what looks to me like a regression in the handling of CanvasRenderingContext2D.createPattern().

Steps to reproduce:
Using 106.0a1 (2022-08-28):

Expected results:
The .png pattern should be repeated across the canvas element.

Actual results:
The outer 1px of the .png image appears to be repeated instead of the entire image.

Details:
See the attached screenshot which shows nightly 106.0a1 (2022-08-28) on the left and 104.0 on the right with the expected behavior.

I can repro with gpu-canvas.

@brismith:
In your about:config, is gfx.canvas.accelerated = true ? Can you set it to false, restart your browser, and retry?

Flags: needinfo?(brismith)
Blocks: gpu-canvas

:aosmond and :lsalzman - is this something you can look at?

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

(In reply to Mayank Bansal from comment #1)

In your about:config, is gfx.canvas.accelerated = true?

Yes, this was set to true by default.

Can you set it to false, restart your browser, and retry?

Disabling via gfx.canvas.accelerated = false and restarting, the pattern repeats as expected and the issue is fixed.

2022-08-29T18:49:39.530000: DEBUG : Found commit message:
Bug 1779681 - Mark WebGL framebuffer as initially valid in DrawTargetWebgl. r=aosmond,gfx-reviewers

mWebglValid gets initialized to false, but it will never get reset to true until the next
frame, causing us to render into Skia the first frame rather than accelerate. Therefor, we
should just initialize it to valid. Since it is cleared to zero initially, this is safe.

Differential Revision: https://phabricator.services.mozilla.com/D151896

2022-08-29T18:49:39.530000: DEBUG : Did not find a branch, checking all integration branches
2022-08-29T18:49:39.532000: INFO : The bisection is done.
2022-08-29T18:49:39.534000: INFO : Stopped

Flags: needinfo?(brismith)
Regressed by: 1779681

Set release status flags based on info from the regressing bug 1779681

Assignee: nobody → lsalzman
Status: NEW → ASSIGNED
Flags: needinfo?(lsalzman)
Pushed by lsalzman@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/31b043883d4a
Only support clamp extend mode in DrawTargetWebgl. r=gfx-reviewers,jrmuizel
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 106 Branch
Flags: needinfo?(aosmond)

The patch landed in nightly and beta is affected.
:lsalzman, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox105 to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(lsalzman)
Flags: needinfo?(lsalzman)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: