-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Remove CanvasProxy along with related concepts and complexities #790
Conversation
Yay, been waiting to see this happen! Commit message nits:
Will start reviewing now... |
data-x="concept-canvas-direct-webgl">direct-webgl</dfn>, <dfn | ||
data-x="concept-canvas-indirect">indirect</dfn>, or <dfn | ||
data-x="concept-canvas-proxied">proxied</dfn> by algorithms defined in this specification.</p> | ||
data-x="concept-canvas-2d">2d</dfn>, or <dfn |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/, or/ or/
Got through most of this, although I haven't had a chance to do a read-through scouring for leftovers. More eyes would be appreciated. |
[<span data-x="dom-context-2d">Constructor</span>(), | ||
<span data-x="dom-context-2d">Constructor</span>(unsigned long width, unsigned long height), | ||
Exposed=(Window,Worker)] | ||
[Exposed=(Window,Worker)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be just Window right or removed altogether?
It's been too long for me to remember if there's any surprises here, sorry. Did you see if there were any unexpected changes in the commit that added this? That's what I'd start with. |
Agreed that this is now @junov's area :). We can do editorial review though. Which I've finished. |
For this PR that is mostly just removing stuff, it is mostly editorial guidance that is needed from reviewers. But for the next steps that will involve adding OffscreenCanvas and related sub-features, I intend to ping some usual canvas suspects from Gecko and WebKit to get their guidance. Mozilla's implementation is further along than our's, so I would expect them to be able to provide guidance based on choices and assumptions they had to make, and problems that were encountered. |
The CanvasProxy feature is being removed to make room for a newer incarnation known as OffscreenCanvas, which will be added soon. Draft Proposal: https://wiki.whatwg.org/wiki/OffscreenCanvas There are currently no known implementations of CanvasProxy. Summary of changes: * Remove CanvasProxy and all canvas methods related to CanvasProxy * Remove the notion of a CanvasRenderingContext2D being in a proxied state. * Remove the notion of a CanvasRenderingContext2D being in an indirect state. * Remove the notion of a "scratch bitmap" from CanvasRenderingContext2D and use a single concept of an "output bitmap" everywhere. * Remove the notion of a "list of pending user interface actions" * Remove the notion canvas context binding, no more standalone contexts, no more setContext method on canvas. * Remove the commit() method of CanvasRenderingContext2D. * Remove the CanvasRenderingContext2D constructor. * Remove the notion of concept-canvas-context-bitmap-mode, canvii now always behave as what was previous described as "fixed" mode. * Rename bitmap modes "direct-2d" and "direct-webgl" to just "2d" and "webgl" respectively. * The hit region list, alpha flag, and origin-clean flag are now internal attributes of CanvasRenderingContext2D, rather than attributes of the scratch/output bitmaps. * CanvasRenderingContext2D and its sub-interfaces are no longer exposed in Workers.
new commit. |
Gentle ping. |
Will look at this again today. It seems likely that I'll just be able to merge it. |
The CanvasProxy feature is being removed to make room for a newer incarnation known as OffscreenCanvas, which will be added soon. Draft Proposal: https://wiki.whatwg.org/wiki/OffscreenCanvas. There are currently no known implementations of CanvasProxy. Summary of changes: * Remove CanvasProxy and all canvas methods related to CanvasProxy * Remove the notion of a CanvasRenderingContext2D being in a proxied state. * Remove the notion of a CanvasRenderingContext2D being in an indirect state. * Remove the notion of a "scratch bitmap" from CanvasRenderingContext2D and use a single concept of an "output bitmap" everywhere. * Remove the notion of a "list of pending user interface actions" * Remove the notion canvas context binding: no more standalone contexts, no more setContext method on canvas. * Remove the commit() method of CanvasRenderingContext2D. * Remove the CanvasRenderingContext2D constructor. * Remove the notion of concept-canvas-context-bitmap-mode, canvii now always behave as what was previous described as "fixed" mode. * Rename bitmap modes "direct-2d" and "direct-webgl" to just "2d" and "webgl" respectively. * The hit region list, alpha flag, and origin-clean flag are now internal attributes of CanvasRenderingContext2D, rather than attributes of the scratch/output bitmaps. * CanvasRenderingContext2D and its sub-interfaces are no longer exposed in Workers. PR: #790
Merged as 740634d. Awesome!!! Looking forward to OffscreenCanvas :D |
This change fixes issue #923 by allowing ImageBitmap objects to be created from SVG source images, as long as the image has an intrinsic size. If the image does not have an intrinsic size, we still reject the promise with an InvalidStateError, as before. This change also removes CanvasRenderingContext2D from ImageBtimapSource, which was an oversight in PR #790. Since there is no longer a concept of a standalone context, this is no longer needed.
This change fixes issue whatwg#923 by allowing ImageBitmap objects to be created from SVG source images, as long as the image has an intrinsic size. If the image does not have an intrinsic size, we still reject the promise with an InvalidStateError, as before. This change also removes CanvasRenderingContext2D from ImageBtimapSource, which was an oversight in PR whatwg#790. Since there is no longer a concept of a standalone context, this is no longer needed.
Rendering context binding and unbinding dates back to 285b52f, which was mostly removed in whatwg#790.
The CanvasProxy feature is being removed to make room for a newer
incarnation known as OffscreenCanvas, which will be added soon.
Draft Proposal: https://wiki.whatwg.org/wiki/OffscreenCanvas
There are currently no known implementations of CanvasProxy.
Summary of changes:
state.
state.
and use a single concept of an "output bitmap" everywhere.
contexts, no more setContext method on canvas.
now always behave as what was previous described as "fixed" mode.
"webgl" respectively.
*The hit region list, alpha flag, and origin-clean flag are now internal attributes of CanvasRenderingContext2D, rather than attributes of the scratch/output bitmaps.