Repository navigation
Composition-aware geometries and drawing change detection - #21682
Conversation
|
You can test this PR using the following package version. |
|
Thanks for finally implementing this! It's I think the very first bug that I reported after I started using Avalonia. |
kekekeks
left a comment
There was a problem hiding this comment.
LGTM in general, but with some notes
| RaiseInvalidated(); | ||
| } | ||
|
|
||
| private void ChildInvalidated(object? sender, EventArgs e) |
There was a problem hiding this comment.
We do have some pre-existing protection against reference cycles, right?
There was a problem hiding this comment.
We don't. Even before that PR, you could have a drawing reference cycle that would result in a stack overflow. This should be handled independently of this PR, imo.
|
You can test this PR using the following package version. |
What does the pull request do?
This PR has 3 parts related to change propagation in geometries and drawings, listed below.
(Each commit can be reviewed independently. I didn't split the PR because drawing changes need the 3 of them to work properly.)
Compositor-aware
GeometryGeometryisServerCompositionSimpleGeometry, which holds anIGeometryImpl.DrawingBrushchange propagationDrawingBrushnow uses the same mechanism asVisualBrushto track the changes to itsDrawingproperty and re-serialize them.ServerCompositionSimpleContentBrush, its server counterpart, now properly observes the changes to its resources, which can include geometries.Drawingchange detectionDrawingandDrawingGroupnow invalidate themselves when their inner drawings are replaced.DrawingImageandDrawingBrushmake use of that to re-serialize the changes to the compositor.Fixed issues