-
-
Notifications
You must be signed in to change notification settings - Fork 833
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
LibWeb+LibGfx: Use GPU backend for <canvas> #1532
Draft
kalenikaliaksandr
wants to merge
8
commits into
LadybirdBrowser:master
Choose a base branch
from
kalenikaliaksandr:gpu-canvas
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
LibWeb+LibGfx: Use GPU backend for <canvas> #1532
kalenikaliaksandr
wants to merge
8
commits into
LadybirdBrowser:master
from
kalenikaliaksandr:gpu-canvas
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kalenikaliaksandr
force-pushed
the
gpu-canvas
branch
from
September 25, 2024 19:43
93227f6
to
ae5603a
Compare
ADKaster
reviewed
Sep 25, 2024
ADKaster
reviewed
Sep 25, 2024
kalenikaliaksandr
force-pushed
the
gpu-canvas
branch
from
September 26, 2024 15:08
ae5603a
to
01219e0
Compare
This is a fix to the vcpkg package itself to fix some exported symbols.
This is required to share GPU context creation code between display list player, which resides in LibWeb, and PainterSkia, which handles <canvas> painting.
kalenikaliaksandr
force-pushed
the
gpu-canvas
branch
from
September 26, 2024 15:31
01219e0
to
6c813fc
Compare
Adds a new class in LibGfx that represents GPU-accelerated surface and will be used for both <canvas> and page rendering (display list player).
Since the Metal context is currently only used by LibGfx, it could be moved there to avoid having Metal as a dependency for everything that uses LibCore.
Since the Vulkan context is currently only used by LibGfx, it could be moved there to avoid having Vulkan as a dependency for everything that uses LibCore.
This is implemented by using a GPU-accelerated surface for <canvas> when a GPU context is available. A side effect of this change is that all canvas modifications have to be performed through Gfx::Painter, and whenever its content has to be accessed, we need to take a snapshot of the corresponding GPU surface. A new DrawPaintingSurface display list command is introduced to allow cheap blitting of canvas content without having to read GPU surface content into RAM.
kalenikaliaksandr
force-pushed
the
gpu-canvas
branch
from
September 26, 2024 16:19
6c813fc
to
f52f8b6
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is implemented by using a GPU-accelerated surface for when
a GPU context is available.
A side effect of this change is that all canvas modifications have to be
performed through Gfx::Painter, and whenever its content has to be
accessed, we need to take a snapshot of the corresponding GPU surface.
A new DrawPaintingSurface display list command is introduced to allow
cheap blitting of canvas content without having to read GPU surface
content into RAM.This is a fix to the vcpkg package itself to fix some exported symbols.
This change depends on #1528 so I am marking it as a draft until it's merged.