[wpt-sync] Sync PR 35310 - Generate globalAlpha effect via filters
Categories
(Core :: DOM: Core & HTML, task, P4)
Tracking
()
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
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
Assignee | ||
Comment 2•2 years ago
|
||
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
- /html/canvas/element/manual/layers/layers-alpha.html [wpt.fyi]:
FAIL
(Chrome:PASS
, Safari:FAIL
)
Comment 4•2 years ago
|
||
bugherder |
Description
•