Bug 283286
| Summary: | [GTK][WPE][Skia] Add GPU synchronization primitives to NativeImage/ImageBuffer for Skia | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Nikolas Zimmermann <zimmermann> |
| Component: | WPE WebKit | Assignee: | Nikolas Zimmermann <zimmermann> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | bugs-noreply |
| Priority: | P2 | ||
| Version: | WebKit Local Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Bug Depends on: | 283292 | ||
| Bug Blocks: | 279618 | ||
Nikolas Zimmermann
For the planned threaded GPU rendering mode we need a way to mark
a NativeImage/ImageBuffer "as done", to inject a fence in the GL
command stream, that we can wait on at a later point in time to
guarantee that all operations finished. Therefore I propose to
add Skia specific functions to ImageBuffer(Backend)/NativeImageBackend:
- finishAcceleratedRenderingAndCreateFence()
Used to notify the underlying SkSurface, that it should flush
all pending rendering operations and submit the work to the GPU.
Afterwards inject a fence into the GL command stream, so that we
we can wait upon completion at a later point, before attempting
to use the ImageBuffer/NativeImage.
- waitForAcceleratedRenderingFenceCompletion()
Performs a 'serverWait()' operation on the GLFence, previously
created by finishAcceleratedRenderingAndCreateFence(). This
instructs to GPU to await completion of the previous rendering.
finishAcceleratedRenderingAndCreateFence() will be used during
DisplayList recording, whenever an ImageBuffer/NativeImage resource
is used, upon entering the DisplayList::ResourceHeap cache.
waitForAcceleratedRenderingFenceCompletion() will be used during
DisplayList replaying, whenever an ImageBuffer/NativeImage resource
is extracted from the DisplayList::ResourceHeap cache.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Nikolas Zimmermann
Pull request: https://github.com/WebKit/WebKit/pull/36794
EWS
Committed 286767@main (774fd3dddd84): <https://commits.webkit.org/286767@main>
Reviewed commits have been landed. Closing PR #36794 and removing active labels.