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

Fix short-circuit logic in HitTester #2739

Merged
merged 1 commit into from May 8, 2018
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Fix short-circuit logic in HitTester

|= (the bitwise or-assignement operator) does not do short-circuiting.
It isn't an error to call is_point_clipped_in_for_clip_chain again in
this case, but it has the potential to do a lot of extra work.
  • Loading branch information
mrobinson committed May 8, 2018
commit 4415d34cd85b85b091e764d9f0b9f9dbc698142e
@@ -251,7 +251,7 @@ impl HitTester {
}

let clip_chain_index = clip_and_scroll.clip_chain_index;
clipped_in |=
clipped_in = clipped_in ||
self.is_point_clipped_in_for_clip_chain(point, clip_chain_index, &mut test);
if !clipped_in {
break;
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.