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

Enforce async scene building #2992

Merged
merged 5 commits into from Aug 30, 2018
Merged

Enforce async scene building #2992

merged 5 commits into from Aug 30, 2018

Conversation

@nical
Copy link
Collaborator

nical commented Aug 28, 2018

Make async scene building mandatory. There are some simplifications we can get out of doing this that I want to take advantage of for the async tab switch work.
This is a first step that enforces that all transactions which invalidate the scene must go through the scene builder thread. More stuff coming.


This change is Reviewable

@nical nical changed the title Always async scene Enforce async scene building Aug 28, 2018
@kvark
kvark approved these changes Aug 28, 2018
@gw3583
Copy link
Collaborator

gw3583 commented Aug 28, 2018

REFTEST INFO | 295 passing, 1 failing
Reftests with unexpected results:
	reftests/text/colors.yaml == reftests/text/colors-subpx.png
Traceback (most recent call last):
  File "script/headless.py", line 75, in <module>
    subprocess.check_call(['../target/release/wrench', '--no-scissor', '-h'] + sys.argv[1:])
  File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['../target/release/wrench', '--no-scissor', '-h', 'reftest']' returned non-zero exit status 1
[taskcluster 2018-08-28 19:25:10.272Z] === Task Finished ===

@nical nical force-pushed the nical:always-async-scene branch from 59f5070 to 2d082df Aug 29, 2018
@nical
Copy link
Collaborator Author

nical commented Aug 30, 2018

The reftest was failing because we don't update the scene builder's FrameBuilderConfig upon receiving the DebugCommand that toggles dual source blending on/off and the reftest was making use of it. It's fixed in the last commit.

@kvark
kvark approved these changes Aug 30, 2018
@kvark
Copy link
Member

kvark commented Aug 30, 2018

@bors-servo
Copy link
Contributor

bors-servo commented Aug 30, 2018

📌 Commit 27caf18 has been approved by kvark

@bors-servo
Copy link
Contributor

bors-servo commented Aug 30, 2018

Testing commit 27caf18 with merge c89f16a...

bors-servo added a commit that referenced this pull request Aug 30, 2018
Enforce async scene building

Make async scene building mandatory. There are some simplifications we can get out of doing this that I want to take advantage of for the async tab switch work.
This is a first step that enforces that all transactions which invalidate the scene must go through the scene builder thread. More stuff coming.

<!-- 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/2992)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Aug 30, 2018

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

@bors-servo bors-servo merged commit 27caf18 into servo:master Aug 30, 2018
3 checks passed
3 checks passed
Taskcluster (pull_request) TaskGroup: success
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
homu Test successful
Details
bors-servo added a commit that referenced this pull request Sep 4, 2018
Move the pending scene data structure to the SceneBuilder thread

This PR reorganizes the code in the render backend and scene builder such that:

 - The render backend now only manages a single scene per document: the one it can use for frame building.
 - The scene builder now manages a scene per document and uses it to generate the `FrameBuilder`.
 - The render backend sends to the scene builder thread the events it needs to keep the Scene data structure up to date.
 - Transactions have been consolidated around 3 structs: `TransactionMsg` is what the API sends to the render backend, `Transaction` is what the render backend creates and sends to the scene builder thread(s), and `BuiltTransaction` is what the scene builder sends back to the render backend after scene building. These three structs represent the same thing but at different stages of the pipeline.
 - A *lot* of code was simplified (for example no more calling `update_document` twice with different parameters before and after scene building to have it do different things)

This change is needed in order to get the low priority scene building in #2989 to work without requiring extra handshakes between the scene builder and the render backend threads.

This is rebased on top of #2992.

<!-- 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/2998)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.