-
Notifications
You must be signed in to change notification settings - Fork 21
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
colorMetadata
should not be limited to rendering to a display
#101
Comments
Originally posted by @palemieux in whatwg/html#9461 (comment) So if I understand correctly, this would enter the unclear and problematic "painting time", right?. For instance a series of drawing operations may not trigger that "rendering" up until the canvas is drawn on the screen, or on another canvas, or until it's read through |
I do not understand what problem(s) this causes. Do you have a concrete example or a similar situation in a different context? An author can change properties of the DOM dynamically, e.g. background color. Isn't that similar? |
Maybe I'm missing a big point here, and if it's the case I'm sorry. This option will affect the resulting pixels values on the canvas buffer, right? I.e. the ones that can be read through If my understanding is correct, then my concerns are on the "when" this attribute would apply. ctx.colorMetadata = metadata1;
ctx.drawImage(imgA, x, y);
// some random time later
ctx.colorMetadata = metadata2;
ctx.drawImage(imgB, x, y); In above example, depending on what happens during I guess my point is that the Canvas2D API currently doesn't rely on this "rendering time" at all, and all its attributes are applied at the time of "drawing" (i.e. when the drawing commands are to be executed, as opposed as to when the bitmap is "rendered"). If you look for instance at how the compositing rules are defined currently, each new drawing will use the compositing rule that was set at the time it was called. Having an attribute that has its effects at some random time, sounds a bit concerning. One possible way around that would be to limit this setting to inside layers, the same way it's being proposed for filters. This way the author would have control over what content is affected by this attribute. But this would probably delay the landing of the feature since the layers proposal seems a bit stalled currently. |
Wouldn't it be "surprising" only if the author changes the value of The primary use case for Makes sense? [ed.: thanks for walking me through this.] |
See whatwg/html#9461 (comment)
The text was updated successfully, but these errors were encountered: