Closed Bug 1782789 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 35310 - Generate globalAlpha effect via filters

Categories

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

task

Tracking

()

RESOLVED FIXED
106 Branch
Tracking Status
firefox106 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

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

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

Andres Perez <andresrperez@google.com> wrote:

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/3763215
WPT-Export-Revision: 8a084e532e5b7fb20500974c584c078534ae5f15

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]

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/c5d1e52256d7 [wpt PR 35310] - Generate globalAlpha effect via filters, a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 106 Branch
You need to log in before you can comment on or make changes to this bug.