Closed Bug 1921842 Opened 2 months ago Closed 1 month ago

[wpt-sync] Sync PR 48386 - createImageBitmap: Fuse all operations

Categories

(Core :: Graphics: Canvas2D, task, P4)

task

Tracking

()

RESOLVED FIXED
133 Branch
Tracking Status
firefox133 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 48386 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/48386
Details from upstream follow.

Christopher Cameron <ccameron@chromium.org> wrote:

createImageBitmap: Fuse all operations

Consider the function CropImageAndApplyColorSpaceConversion. This
function has separate steps for:

  • Crops
  • Down-scale
  • Flip
  • Color-convert (ish)
  • Re-orient (maybe)
  • Multiply or un-multiply alpha
  • Up-scale

These are all separate steps that take an input image and produce an
output image. These operations can (almost) all be fused into a single
blit. Add the function ApplyImageBitmapOptionsTransformsWithBlit to
do this single blit.

Move only one createImageBitmap path to this. Once all paths move
to this, we will remove the functions FlipImageVertically, ScaleImage,
ApplyColorSpaceConversion, BakeOrientation, MakeBlankImage,
CropImageAndApplyColorSpaceConversion, and the guts of a handful
of ImageBitmap::ImageBitmap instances (ImageData I'm looking at you).

This happens to fix one WPT test. Add a bunch more sub-tests for
that test (all other browsers pass that test, along with the new
sub-tests).

This does not handle the case of unpremultiplied alpha, and falls
back to the old path. A similar unpremultiplied alpha path will be
added.

Bug: 40773069, 362431889
Change-Id: Id39ec3aaa5e9b373397b5932ffd31984bcc8c4b5

Reviewed-on: https://chromium-review.googlesource.com/5890810
WPT-Export-Revision: cd422e978abe13dd81f772485fb4bdf6d871edd0

Component: web-platform-tests → Graphics: Canvas2D
Product: Testing → Core

CI Results

Ran 6 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 1 tests and 7 subtests

Status Summary

Firefox

OK : 1
PASS: 7

Chrome

OK : 1
PASS: 2
FAIL: 5

Safari

OK : 1
PASS: 7

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c362a5bce5b5 [wpt PR 48386] - createImageBitmap: Fuse all operations, a=testonly
Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 133 Branch
You need to log in before you can comment on or make changes to this bug.