Conversation
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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.
Summary
Implements
peniko::Extend::None(Skia's "decal" tile mode: transparent outside the image) for image sampling in all three renderers, enabling native CSSbackground-repeat: no-repeatwithout renderer-side clipping workarounds. Depends on DioxusLabs/peniko#1;Cargo.tomlpins peniko to that commit (rev = "4409521...").Core sampling rule, applied uniformly:
PadandNoneshare the clamp path).Per renderer:
vello_cpu:in_bounds_mask/mask_to_weights/apply_maskhelpers infine/common/image.rs, used by the nearest/bilinear/bicubic painters in both the f32 and u8 (lowp) kernels, including the axis-aligned fast paths.vello:fine.wgslgainsEXTEND_NONE,extend_mode_unclamped, andtap_weight; nearest/bilinear/bicubic image sampling multiply taps by decal weights. The existing 2-bit extend fields in the packed encoding already fit value 3, so no encoding change.vello_hybrid: same treatment inrender.weslfor the atlas and external-texture paths (nearest/bilinear/bicubic).EncodedImage::may_have_transparencyis now forced when either axis usesExtend::None, so the sparse-strips renderers composite instead of overwriting the background (anExtend::Nonefill is inherently non-opaque outside the image).Gradients don't get new behavior:
Extend::Noneon a gradient falls back toPad.New snapshot tests:
image_none_x_none_y{,_bilinear,_bicubic},image_none_x_repeat_y,image_repeat_x_none_y, passing on all CPU variants and hybrid. (Running the hybrid tests locally requiresmesa-vulkan-drivers/lavapipe, matching CI.)Link to Devin session: https://dioxus.staging.devinenterprise.com/sessions/bfa7c4cb42024f28989602f3e38728aa
Requested by: @nicoburns