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
Partial renderer: Initial work #1008
Conversation
3a1a124
to
190f255
Compare
This will allow partial updates
190f255
to
998b2f7
Compare
|
||
//let clip = self.get_current_clip().intersection(&self.dirty_region.to_rect()); | ||
//let draw = clip.map_or(false, |r| r.intersects(&item_geometry)); | ||
//FIXME: the dirty_region is in global coordinate but item_geometry and current_clip is not |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either i should keep a local cache of the current translation, or somehow a getter for the current translation to the ItemRenderer.
With rotate this could be an arbitrary transform tough
998b2f7
to
cf3cb7c
Compare
let prepare_scene = PrepareScene::new(size, factor, runtime_window.default_font_properties()); | ||
let mut renderer = i_slint_core::item_rendering::PartialRenderer::new(cache, prepare_scene); | ||
|
||
let mut dirty_region = i_slint_core::item_rendering::DirtyRegion::default(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this variable needed? It seems to me that renderer.dirty_region
is the true source that's updated in the compute_dirty_regions()
calls below and the union
calls appear to make this variable just "tail" it.
Perhaps into_inner
can "spit" out the "old" renderer and the final computed dirty region?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but in case there are popups we need to make the union of all dirty regions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's true. But isn't that already the case? I don't see the renderer's dirty_region
being reset between the components (main and possible popup) in the callback passed to draw_contents
?
No description provided.