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

APZ doesn't seem to be async enough #1357

Closed
jrmuizel opened this issue Jun 9, 2017 · 5 comments
Closed

APZ doesn't seem to be async enough #1357

jrmuizel opened this issue Jun 9, 2017 · 5 comments

Comments

@jrmuizel
Copy link
Contributor

@jrmuizel jrmuizel commented Jun 9, 2017

Edit: https://bugzilla.mozilla.org/show_bug.cgi?id=1391318

I'm concerned that rasterizing blob images, glyphs and processing a new scene will block scrolling. If this is true we should do better.

@nical
Copy link
Collaborator

@nical nical commented Jun 15, 2017

We could group all blob images for a certain frame and only upload them to the texture cache when the entire group is rasterized to preserve some form of frame consistency, but not block the frame on the blob images being rasterized (or have the render backend thread block for at most a certain amount of time). This would not provide full frame consistency because we could still do some layout changes and see them on the screen before blob images from the same frame are ready. Full frame consistency while preserving APZ is hard. We could maybe just block the render backend until blob images are rasterized when there is a layout change so that we preserve APZ as much as possible and only jank when layout changes (does not sound great but still better than where we are at today).
We could also only wait for the blob images if they were created or updated this frame. This would result in checkerboarding when scrolling as blob image tiles get requested (kinda like what we have for tiled painted layer in gecko today).

For glyphs it would be cool if we could just replace missing glyphs with a placeholder when rasterization takes too long (the place holder could be an already-rasterized same letter with a different size or font. I bet it wouldn't be very noticeable (less noticeable than popping or missing the frame budget).

@jrmuizel
Copy link
Contributor Author

@jrmuizel jrmuizel commented Jun 27, 2017

I don't think we'll be able to have the kind of frame consistency problems that you describe. It might be worth trying but we'll need a plain that has better consistency.

bors-servo added a commit that referenced this issue Jul 27, 2017
Multi-doc support

A namespace can now contain multiple documents. Operations on a document are done ~~via a separate object `DocumentApi`, which created from `ResourceApi` that manages resources~~ by providing `DocumentId` parameter to `RenderApi` calls.

This PR is a step towards #1357, also relates to #1370.

<!-- 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/1509)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Jul 27, 2017
Decoupled flattening from ResourceCache

Part of the plan to get #1357

r? @nical @glennw

<!-- 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/1527)
<!-- Reviewable:end -->
@jrmuizel jrmuizel mentioned this issue Jul 28, 2017
20 of 24 tasks complete
@kvark kvark added the bugzilled label Aug 17, 2017
@kvark
Copy link
Member

@kvark kvark commented Oct 6, 2017

Rough plan to proceed (adopted from @nical ):

  1. Fully detach the scene building from ResourceCache (part of the work went in #1527).
  2. Move the scene building to another thread (potentially, in a thread pool)
  3. Move (some of?) rasterization of images/glyphs into the scene building, or out of the main RB thread anyway.
@nical
Copy link
Collaborator

@nical nical commented Oct 6, 2017

Move (some of?) rasterization of images/glyphs into the scene building, or out of the main RB thread anyway.

To add some precision, these are already happening on the thread pool, but the frame construction blocks until they are done. There is some tweaking we could do to stop blocking on at least a subset of the cpu rasterization, and that would probably require doing a bit of rasterization as part of the off-render-backend scene construction to avoid flickering in some cases. But we can go into the details of that when we have the infrastructure in place to build the scene asynchronously.

@nical
Copy link
Collaborator

@nical nical commented Jul 13, 2018

let's close this as dupe of #2759.

@nical nical closed this Jul 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.