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

Ensure scene-only transactions still go through the scene builder thread #2611

Merged
merged 1 commit into from
Apr 5, 2018

Conversation

staktrace
Copy link
Contributor

@staktrace staktrace commented Apr 4, 2018

If WR gets a transaction which only contains scene messages, and has the
flag to use the scene builder thread, it will not actually use the scene
builder thread, because the update_document function first drains all
the scene messages, and then checks to see if the transaction is empty.
In this scenario the transaction is empty (because all the scene
messages got drained) but the op.build flag is set to true. So instead
of delegating the scene build to the builder thread, the build is done
on the RB thread.

This patch modifies the condition so that all transactions that are
intended to be handled by the scene builder thread get handled there.


This change is Reviewable

…ead.

If WR gets a transaction which only contains scene messages, and has the
flag to use the scene builder thread, it will not actually use the scene
builder thread, because the update_document function first drains all
the scene messages, and then checks to see if the transaction is empty.
In this scenario the transaction is empty (because all the scene
messages got drained) but the op.build flag is set to true. So instead
of delegating the scene build to the builder thread, the build is done
on the RB thread.

This patch modifies the condition so that all transactions that are
intended to be handled by the scene builder thread get handled there.
@staktrace
Copy link
Contributor Author

r? @nical

@nical
Copy link
Contributor

nical commented Apr 4, 2018

@bors-servo r+

@bors-servo
Copy link
Contributor

📌 Commit 312b17e has been approved by nical

@bors-servo
Copy link
Contributor

⌛ Testing commit 312b17e with merge f9ddc52...

bors-servo pushed a commit that referenced this pull request Apr 4, 2018
Ensure scene-only transactions still go through the scene builder thread

If WR gets a transaction which only contains scene messages, and has the
flag to use the scene builder thread, it will not actually use the scene
builder thread, because the update_document function first drains all
the scene messages, and then checks to see if the transaction is empty.
In this scenario the transaction is empty (because all the scene
messages got drained) but the op.build flag is set to true. So instead
of delegating the scene build to the builder thread, the build is done
on the RB thread.

This patch modifies the condition so that all transactions that are
intended to be handled by the scene builder thread get handled there.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/2611)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

☀️ Test successful - status-appveyor, status-taskcluster
Approved by: nical
Pushing f9ddc52 to master...

@bors-servo bors-servo merged commit 312b17e into servo:master Apr 5, 2018
@staktrace staktrace deleted the async_build branch April 5, 2018 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants