Bug 315200
| Summary: | [WPE][GTK] Rationalize Vulkan types and their base wrapper templates | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Adrian Perez <aperez> |
| Component: | Platform | Assignee: | Adrian Perez <aperez> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Other | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Bug Depends on: | |||
| Bug Blocks: | 312990 | ||
Adrian Perez
Currently we have the BaseStruct<T> and Structure<T, C> templates defined directly in VulkanTypes.h; but:
* Structure<T, C> does not need to inherit from BaseStruct<T>, because in reality Vulkan
handles and structures are used differently. Inheritance for convenience of (very little)
reuse here is not a good idea because we cannot pass a Structure where a Handle is expected.
- While at it, these should be called “Structure” and “Handle”.
* Handles may be owned by other objects in some cases (for example VkPhysicalDevice) and
instead of making each class override methods is not great.
- Instead, we should be defining a different type for a handle that is “borrowed” and
owned by some other object. This kind of handle would be copyable.
* It would be nicer to have separate VulkanHandle.h / VulkanStructure.h files for these types.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Adrian Perez
Pull request: https://github.com/WebKit/WebKit/pull/65296
EWS
Committed 313650@main (f5514504e1ab): <https://commits.webkit.org/313650@main>
Reviewed commits have been landed. Closing PR #65296 and removing active labels.
Radar WebKit Bug Importer
<rdar://problem/177596999>