Skip to content
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

vello_editor: Always paint on RedrawRequested. #145

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

xorgy
Copy link
Member

@xorgy xorgy commented Oct 23, 2024

In non-composited environments, damage accumulates if we don't present.

@xorgy xorgy changed the title Always paint on RedrawRequested. vello_editor: Always paint on RedrawRequested. Oct 23, 2024
@xorgy
Copy link
Member Author

xorgy commented Oct 23, 2024

This is, in part, a fix for a regression caused by #143 on non-composited environments (e.g. uncomposited X11, sometimes Windows).

In non-composited environments, damage accumulates if we don't present.
@xorgy
Copy link
Member Author

xorgy commented Oct 23, 2024

The efficient way to handle this is probably to do a pass with LoadOp::Load or some such, since we know the configuration hasn't changed, or somehow to present the old texture again (idk if this is a thing).

@waywardmonkeys
Copy link
Contributor

This would be better with a better Vello rendering API separating rendering to a texture and the blit to the surface.

@xorgy xorgy added this pull request to the merge queue Oct 23, 2024
@xorgy
Copy link
Member Author

xorgy commented Oct 23, 2024

I gave a first try at writing a render pass that would load the old image and do nothing, but the old image is black on my platform, I suspect this is not a real way to do this. Preventing redraw might involve at least copying the surface texture, or always rendering to texture.

Merged via the queue into linebender:main with commit 03dc361 Oct 23, 2024
20 checks passed
@xorgy xorgy deleted the fix-damage-redraw branch October 23, 2024 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants