Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spec that out-of-range premultipliedAlpha:true values have undefined compositing results. #3698

Merged
merged 1 commit into from
Oct 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions specs/latest/1.0/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -839,12 +839,29 @@ <h4>Context creation parameters</h4>
</dd>
<dt> <span class=prop-value>premultipliedAlpha</span>
<dd>
<p>
If the value is true the page compositor will assume the drawing buffer contains
colors with premultiplied alpha. If the value is false the page compositor will
assume that colors in the drawing buffer are not premultiplied. This flag is ignored
if the <strong>alpha</strong> flag is
false. See <a href="#PREMULTIPLIED_ALPHA">Premultiplied Alpha</a> for more
if the <strong>alpha</strong> flag is false.
</p>
<p>
With <code>premultipliedAlpha:true</code>, any pixels sent to the page
compositor shall have color values less-than-or-equal-to their alpha value,
otherwise the colors resulting from compositing such out-of-range pixel values
are undefined.
<div class="note">
For example, with <code>premultipliedAlpha:true</code>
<code>vec4(1.0, 0.0, 0.0, 0.5)</code> might display as green
instead of red, possibly due to optimized packed compositing math overflows.
This is left undefined due to the intractible performance impact of requiring
consistent behavior.
</div>
</p>
<p>
See <a href="#PREMULTIPLIED_ALPHA">Premultiplied Alpha</a> for more
information on the effects of the <code>premultipliedAlpha</code> flag.
</p>
</dd>
<dt> <span class=prop-value>preserveDrawingBuffer</span>
<dd>
Expand Down
Loading