Open Bug 1820511 Opened 3 years ago Updated 3 years ago

Rescaled image isn't drawn on the canvas when it has specific dimensions

Categories

(Core :: Graphics: Canvas2D, defect)

Firefox 112
x86_64
Windows 11
defect

Tracking

()

Tracking Status
firefox112 --- affected

People

(Reporter: calixte, Unassigned, NeedInfo)

Details

Attachments

(2 files, 1 obsolete file)

Attached file max_canvas.html

When opening the attachment a red square should be drawn but it isn't.
If I change the K value to -1 in the script then everything is fine.

In the pdf.js context we have sometimes large images embedded in the pdf and we've to downscale them.

I can't reproduce the bug with nightly on either Mac or Fedora.

On Windows11:
Repro with the D2d backend
Doesnt repro with gpu-canvas
Doesnt repro with skia-canvas

Flags: needinfo?(tnikkel)
Severity: -- → S4

This implements some optimizations targeted at Canvas2D's putImageData:

  1. Track whether the canvas is in the initially clear state so that we avoid
    reading back from the WebGL framebuffer into the Skia framebuffer when a
    fallback does occur or when a data snapshot is needed.

  2. For surfaces that are too large to upload to a texture, directly use
    glTexSubImage2D to draw data to the WebGL framebuffer, bypassing a separate
    texture upload.

  3. Disregard the surface size limits for SurfacePatterns containing a
    compatible texture handle.

Assignee: nobody → lsalzman
Status: NEW → ASSIGNED

Comment on attachment 9321467 [details]
Bug 1820511 - Avoid fallbacks in DrawTargetWebgl::CopySurface. r?aosmond

Revision D171773 was moved to bug 1820546. Setting attachment 9321467 [details] to obsolete.

Attachment #9321467 - Attachment is obsolete: true

Oops, accidentally put wrong bug number in patch.

Assignee: lsalzman → nobody
Status: ASSIGNED → NEW

This seems to be fixed by bug 1759728?

Flags: needinfo?(tnikkel) → needinfo?(cdenizet)

I can reproduce the issue with nightly (20230306211718) and gfx.max-alloc-size set to 2147483647.

Flags: needinfo?(cdenizet)
Attached file big_width.html

I can reproduce the issue with big_width.html where only the width is bigger than 16384 and the height is 100 so it isn't a matter of total area.
I opened big_width.html in release and same problem so it isn't related to the fix in bug 1759728.

Ah, okay, so looks like this is about issues with the d2d backend of canvas then.

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

Attachment

General

Created:
Updated:
Size: