Change context type to 'webgpu' - #1930
Conversation
|
Oh snap, I didn't expect us to be renaming |
|
We certainly don't have to. I don't have a problem with the name personally. I made the change speculatively here based on comments from #131 like:
|
|
I see. The way I read "presentation context" is not "output canvas presented to screen", but rather "WebGPU can present to this canvas". Hence, I found the |
|
Yeah, that's generally how I interpreted it as well. I can understand, given some of the comments about it, how it might be understood by developers differently, though. |
kainino0x
left a comment
There was a problem hiding this comment.
I'm totally fine either way. My opinion about the gpupresent rename carries through to this: no one is going to be confused for more than the few minutes it takes them to go search for a webgpu tutorial, which they were gonna need anyway.
GPUCanvasOutputContext would be ok too.
kvark
left a comment
There was a problem hiding this comment.
I still think GPUPresentationContext was better, but not going to block on it.
There is another name that needs to be changed though
SHA: e86e355 Reason: push, by @kainino0x Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
SHA: e86e355 Reason: push, by @kainino0x Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
SHA: e86e355 Reason: push, by @kainino0x Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Fixes #131
Updates the relevant string and interfaces, if
'webgpu'is indeed the context type string that we go with. Given the concerns voiced in the thread about the verb 'present' or 'presentation' I also opted to revert back toGPUCanvasContextfor the interface name, since that felt like it matched the new context type string a bit better. (Also, neither Firefox nor Chrome has adopted the interface nameGPUPresentationContextyet so, hey! Less work!)(Kai suggested "WebGPUCanvasContext" at some point, since it's not a GPU object in the same way that, say, a texture is. I don't mind that logic, and it would allow it to map more directly to
'webgpu', but it a distinction that probably not significant to developers and it would mean that this interface wouldn't get grouped with the others properly on, for example, pages that list interfaces alphabetically.)Similarly I've renamed
GPUPresentationConfiguration(previouslyGPUSwapChainDescriptor) toGPUContextConfiguration, though I'd be just as happy withGPUCanvasConfigurationor the verboseGPUCanvasContextConfigurationif anyone has strong a preference for either of those alternatives.Preview | Diff