Repository navigation
vello_gpu: Replace image_bicubic with extended_images - #1994
Open
laurenz-canva wants to merge 2 commits into
Open
laurenz-canva wants to merge 2 commits into
laurenz-canva wants to merge 2 commits into
Conversation
LaurenzV
added this pull request to stack #1969
October 8, 2026 10:31
image_bicubic with extended_images
laurenz-canva
force-pushed
the
laurenz/native-image-only
branch
from
October 8, 2026 10:47
b1e6ca9 to
b893510
Compare
LaurenzV
reviewed
Oct 8, 2026
| /// This is the WebGL analogue of the wgpu Renderer's `upload_image` method. | ||
| /// It allocates space in the image cache and uploads the image data to the atlas texture. | ||
| #[track_caller] | ||
| pub fn upload_image<T: WebGlAtlasWriter>( |
Collaborator
There was a problem hiding this comment.
It would be better to just compile out this method if the feature is disabled, instead of panicking at runtime.
However, internally we currently have a runtime feature flag, so unless we are willing to go "all-in" on external texture and remove that, we need to keep the method available, even if the feature is disabled.
LaurenzV
marked this pull request as ready for review
October 8, 2026 10:49
laurenz-canva
force-pushed
the
laurenz/native-image-only
branch
from
October 9, 2026 06:17
b893510 to
a40c81f
Compare
laurenz-canva
force-pushed
the
laurenz/native-image-only
branch
from
October 9, 2026 07:14
a40c81f to
c6f2ec4
Compare
This branch has not been deployed
This file contains hidden or 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
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.
As was shown in #1967, with my Android phone, I'm now able to get 90 FPS with most images! 🎉 However, that's not the case yet with my very old Android tablet. :( Currently, I'm still sitting at 22FPS, while Canvas2D manages to get a smooth 60FPS. This means there is more juice to be squeezed!
This PR proposes to improve that by replacing the
image_bicubicfeature with aextended_imagesfeature. In addition to compiling out bicubic sampling, we also exclude any non-native image sampling path. This means if the feature is disabled, we also stop supporting:upload_imagemethod, as we can't support the internal image atlas.Basically: Users can still render normal images with external textures using NN/bilinear sampling + any arbitrary extend mode (which I think covers the most common cases), but not more than that. As mentioned, the glyph caching situation can be improved in the future.
This gives a decent FPS boost on my tablet, though we are still far from reaching our target FPS.
With only #1968, I get around 22FPS:
IMG_1341.MOV
With this PR, I get around 31FPS:
IMG_1339.MOV