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

Move code to the new transaction API. #2298

Merged
merged 3 commits into from Jan 18, 2018
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

Work around wrench deadlock when a transaction scrolls.

  • Loading branch information
nical committed Jan 18, 2018
commit 27400301f70f2e93dbcfe17c7b5f7a6f50fa0385
@@ -512,15 +512,31 @@ impl Wrench {
false,
);
}
// TODO(nical) - Need to separate the set_display_list from the scrolling
// operations into separate transactions for mysterious -but probably related
// to the other comment below- reasons.
self.api.send_transaction(self.document_id, txn);

let mut txn = Transaction::new();
for (id, offset) in scroll_offsets {
txn.scroll_node_with_id(
*offset,
*id,
ScrollClamping::NoClamping,
);
}
// TODO(nical) - Wrench does not notify frames when there was scrolling
// in the transaction (See RenderNotifier implementations). If we don't
// generate a frame after scrolling, wrench just stops and some tests
// will time out.
// I suppose this was to avoid taking the snapshot after scrolling if
// there was other updates coming in a subsequent messages but it's very
// error-prone with transactions.
// For now just send two transactions to avoid the deadlock, but we should
// figure this out.
self.api.send_transaction(self.document_id, txn);

let mut txn = Transaction::new();
txn.generate_frame();
self.api.send_transaction(self.document_id, txn);
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.