Skip to content

Enforce async scene building - #2992

Merged
bors-servo merged 5 commits into
servo:masterfrom
nical:always-async-scene
Aug 30, 2018
Merged

bors-servo merged 5 commits into
servo:masterfrom
nical:always-async-scene

Conversation

@nical

@nical nical commented Aug 28, 2018 •

Copy link
Copy Markdown
Contributor

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
@gw3583

gw3583 commented Aug 28, 2018

Copy link
Copy Markdown
Contributor
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 always-async-scene branch from 59f5070 to 2d082df Compare August 29, 2018 09:03
@nical

nical commented Aug 30, 2018

Copy link
Copy Markdown
Contributor Author

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 commented Aug 30, 2018

Copy link
Copy Markdown
Member

@bors-servo r+

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 27caf18 has been approved by kvark

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 27caf18 with merge c89f16a...

bors-servo pushed 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
Copy Markdown
Contributor

☀️ 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
bors-servo pushed 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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants