-
Notifications
You must be signed in to change notification settings - Fork 326
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
Reduce draw calls #6707
Reduce draw calls #6707
Conversation
I'll be testing this some more in the morning (with a Book Club), but it's ready for review. |
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.
I can also see some changes to the list view. Please mention them in the PR description so QA reviewers know what to check carefully.
source_width: default(), | ||
source_height: default(), | ||
target_position: default(), | ||
target_attached: default(), | ||
color: default(), | ||
sections: default(), | ||
split_arc: default(), | ||
hover_sections: default(), | ||
corner_points: default(), | ||
target_attachment: default(), | ||
hover_position: default(), | ||
disabled: default(), | ||
previous_target: default(), | ||
previous_is_hoverable: default(), | ||
previous_hover_split: default(), | ||
previous_color: default(), | ||
previous_target_attached: 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.
I wonder if using ..default()
is reasonable here.
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.
I wish I could do it that way, but I can't impl Default for EdgeModel
because it must hold a Scene
, so I can't default-construct an EdgeModel
object to use for field-update syntax.
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.
We could split this into two structs and deref to the inner struct, making the inner struct Default. I'm not sure though if we want it. Up to you :)
$(output.push(&self.$field);)* | ||
output | ||
} | ||
fn source_x_range(&self) -> f32 { |
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.
What is source_x_range
? I'd expect Range<f32>
as the return type for anything with range
in the name.
There's a flicker when the mouse enters/leaves the arc area of a corner, caused by an existing bug. Issue: #6717 |
Updated demo; the old edges are in red: vokoscreenNG-2023-06-01_16-37-03.webmKnown differences:
|
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.
Looks fantastic! Let's remove the old edge impl and let's merge it! Amazing job with fixing the corner cases where the old edges misbehaved!
//! # Partial edges | ||
//! | ||
//! Corners are sufficient to draw any complete edge; however, in order to split an edge into a | ||
//! focused portion and an unfocused portion at an arbitrary location based on the mouse position, | ||
//! we need to subdivide one of the corners of the edge. | ||
//! | ||
//! |\ | ||
//! | 3 | ||
//! / |
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.
these docs are beautiful ❤️
QA: passed 📗 |
Pull Request Description
Implements #6544 (eliminates 10/42 of the constantly-displayed draw calls).
Fixes #6717. Improves startup CPU time by 5% (250ms, loading Orders on my dev box).
Important Notes
Rectangle
to display triangles.Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.
./run ide build
.