-
Notifications
You must be signed in to change notification settings - Fork 6k
[Impeller] Fix incorrect rendering path when duplicated point exists. #40115
Conversation
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 think this makes sense but @dnfield might have more comments. I'll defer to his review is he is able.
impeller/geometry/path.cc
Outdated
@@ -245,7 +245,7 @@ Path::Polyline Path::CreatePolyline(Scalar scale) const { | |||
|
|||
auto get_path_component = | |||
[this](size_t component_i) -> std::optional<const PathComponent*> { | |||
if (component_i >= components_.size()) { | |||
if (component_i < 0 || component_i >= components_.size()) { |
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.
component_i is unsigned. Is this necessary?
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.
My bad. Should all be size_t
instead of int
. Done ^_^
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.
This LGTM.
It does make me wonder if we should just silently elide duplicate components.
…nt exists. (flutter/engine#40115) (#122569) Roll Flutter Engine from cbc8ae897cd1 to 0fca429de53f (1 revision)
…cated point exists. (flutter/engine#40115) (#122569) Commit: 713842fb5ba4cb1b9c2ce2fb1e4770f0f4498e13
Playground test case in this patch
Code
Before:
Before.mp4
After:
After.mp4
Test Recheck
CanDrawCapsAndJoins
Test case in flutter/flutter#119964
Pre-launch Checklist
///
).