mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-30 11:37:16 +02:00
LibGfx: Report premultiplied alpha type for opaque Skia surfaces
We don't discern between opaque and non-opaque alpha types in LibGfx, which at some point we might need to do. But for now, assume all opaque Skia surfaces have premultiplied alpha. Fixes #6892.
This commit is contained in:
committed by
Jelle Raaijmakers
parent
6790a695da
commit
3b7eede694
Notes:
github-actions[bot]
2025-11-26 08:26:02 +00:00
Author: https://github.com/gmta Commit: https://github.com/LadybirdBrowser/ladybird/commit/3b7eede694e Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6928
@@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
const ctx = document.createElement("canvas").getContext("2d", {alpha: false});
|
||||
ctx.fillStyle = "rgba(100, 150, 200, 0.5)";
|
||||
ctx.fillRect(0, 0, 300, 150);
|
||||
const color = ctx.getImageData(0, 0, 300, 150);
|
||||
println(`${color.data[0]}, ${color.data[1]}, ${color.data[2]}, ${color.data[3]}`);
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user