Closed Bug 1790804 Opened 3 years ago Closed 3 years ago

[wpt-sync] Sync PR 35894 - Revert "Generate globalAlpha effect via filters"

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

RESOLVED FIXED
107 Branch
Tracking Status
firefox107 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Justin Novosad <junov@chromium.org> wrote:

Revert "Generate globalAlpha effect via filters"

This reverts commit dadaebb2ad2c16400240c9c2e563b7caace5186b.

Reason for revert: Causes severe performance regressions, makes catapult UI unusable.

Original change's description:

Generate globalAlpha effect via filters

Currently, there are two ways to produce an opacity effect in Canvas2D: set the globalAlpha property or use the opacity canvas filter. By unifying the paths for the two APIs, the resulting effects are guaranteed to be identical and are easier to maintain and debug. After reference and performance testing, it was decided to do the unification by producing the effect defined with globalAlpha via filters.

The new GetGlobalAlphaAsFilter method, added to CanvasRenderingContext2DState, creates an opacity PaintFilter the with the value specified by globalAlpha. The StateGetFilter method now can receive an additional argument to indicate whether to include this filter, in order to allow the use of this method to get the canvas filters defined by the user. When the argument is set to include the globalAlpha filter, the PaintFilter returned is the result of composing the regular user set filters with the one obtained with GetGlobalAlphaAsFilter. The inclusion of the globalAlpha value in the image_flags, which was the way in which the globalAlpha effect was applied previously, was removed.

Bug: 1344922
Change-Id: Id96acd1f9ae07d2cb3076d27503273ea7408b7a0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3763215
Reviewed-by: Juanmi Huertas \<juanmihd@chromium.org>
Commit-Queue: Andres Perez \<andresrperez@google.com>
Reviewed-by: Robert Flack \<flackr@chromium.org>
Reviewed-by: Justin Novosad \<junov@chromium.org>
Reviewed-by: Aaron Krajeski \<aaronhk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1036664}

Bug: 1344922
Change-Id: Ie043bc5b5daf2edb057638020b4b3d77a34ec1e5

Reviewed-on: https://chromium-review.googlesource.com/3894738
WPT-Export-Revision: d3f2294917d164f5aed224f0f5e599368b13b507

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core

CI Results

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

Total 1 tests

Status Summary

Firefox

FAIL: 1

Chrome

PASS: 1

Safari

FAIL: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/69675e74a4ae [wpt PR 35894] - Revert "Generate globalAlpha effect via filters", a=testonly https://hg.mozilla.org/integration/autoland/rev/ea19d3c4eafb [wpt PR 35894] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 107 Branch
You need to log in before you can comment on or make changes to this bug.