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

The scene is rebuilt everytime we scroll #1921

Closed
staktrace opened this issue Oct 24, 2017 · 4 comments
Closed

The scene is rebuilt everytime we scroll #1921

staktrace opened this issue Oct 24, 2017 · 4 comments

Comments

@staktrace
Copy link
Contributor

@staktrace staktrace commented Oct 24, 2017

Github issue for https://bugzilla.mozilla.org/show_bug.cgi?id=1408174 since the code it's referencing is in WR proper and not the gecko side of things.

@jrmuizel
Copy link
Contributor

@jrmuizel jrmuizel commented Nov 9, 2017

It would be good to get this done for Austin. Do we have a good idea how to do so?

@nical
Copy link
Collaborator

@nical nical commented Nov 9, 2017

Currently the animated property bindings are read while flattening the items during the scene building process. Glenn mentioned something in #1774 about reorganizing things to make it so we sample the animated properties while building the frame instead:

Create a tree of Picture and PrimitiveRun structs during the frame flattening. During the render task creation, this tree is what gets walked, instead of the stacking context tree.

@glennw
Copy link
Member

@glennw glennw commented Nov 9, 2017

Yup, I'm working on the patch @nical mentioned above - I have all the (wrench) reftests passing except the plane splitting tests. I'm hoping to finish that up today - this task will be very easy to do once that patch lands.

@glennw
Copy link
Member

@glennw glennw commented Nov 10, 2017

Didn't quite get the picture tree patch finished today, but it's coming together very well. All the Servo/Gecko tests apart from plane splitting are working now. With a bit of luck, that patch should be ready early next week.

glennw pushed a commit to glennw/webrender that referenced this issue Nov 15, 2017
Instead of rebuilding the entire scene / frame when scrolling while
property bindings are present, resolve the animated properties as
we prepare primitives and update the clip-scroll tree.

For transforms, reference frames now retain the property binding
information and build the correct transform in update_node(). We
could possibly optimize this in the future to not always rebuild
the reference frame transform, if there is no property binding active
on this reference frame, if it ever shows up in a profile.

For filters, rely on the new Picture tree functionality and resolve
the opacity filter value when preparing the picture primitive for
rendering. If the property resolves to an invisible filter, then
early out from this entire picture primitive.

Also update the animation example to demonstrate animating opacity.

Fixes servo#1921.
glennw pushed a commit to glennw/webrender that referenced this issue Nov 15, 2017
Instead of rebuilding the entire scene / frame when scrolling while
property bindings are present, resolve the animated properties as
we prepare primitives and update the clip-scroll tree.

For transforms, reference frames now retain the property binding
information and build the correct transform in update_node(). We
could possibly optimize this in the future to not always rebuild
the reference frame transform, if there is no property binding active
on this reference frame, if it ever shows up in a profile.

For filters, rely on the new Picture tree functionality and resolve
the opacity filter value when preparing the picture primitive for
rendering. If the property resolves to an invisible filter, then
early out from this entire picture primitive.

Also update the animation example to demonstrate animating opacity.

Fixes servo#1921.
glennw pushed a commit to glennw/webrender that referenced this issue Nov 15, 2017
Instead of rebuilding the entire scene / frame when scrolling while
property bindings are present, resolve the animated properties as
we prepare primitives and update the clip-scroll tree.

For transforms, reference frames now retain the property binding
information and build the correct transform in update_node(). We
could possibly optimize this in the future to not always rebuild
the reference frame transform, if there is no property binding active
on this reference frame, if it ever shows up in a profile.

For filters, rely on the new Picture tree functionality and resolve
the opacity filter value when preparing the picture primitive for
rendering. If the property resolves to an invisible filter, then
early out from this entire picture primitive.

Also update the animation example to demonstrate animating opacity.

Fixes servo#1921.
glennw pushed a commit to glennw/webrender that referenced this issue Nov 15, 2017
Instead of rebuilding the entire scene / frame when scrolling while
property bindings are present, resolve the animated properties as
we prepare primitives and update the clip-scroll tree.

For transforms, reference frames now retain the property binding
information and build the correct transform in update_node(). We
could possibly optimize this in the future to not always rebuild
the reference frame transform, if there is no property binding active
on this reference frame, if it ever shows up in a profile.

For filters, rely on the new Picture tree functionality and resolve
the opacity filter value when preparing the picture primitive for
rendering. If the property resolves to an invisible filter, then
early out from this entire picture primitive.

Also update the animation example to demonstrate animating opacity.

Fixes servo#1921.
glennw pushed a commit to glennw/webrender that referenced this issue Nov 15, 2017
Instead of rebuilding the entire scene / frame when scrolling while
property bindings are present, resolve the animated properties as
we prepare primitives and update the clip-scroll tree.

For transforms, reference frames now retain the property binding
information and build the correct transform in update_node(). We
could possibly optimize this in the future to not always rebuild
the reference frame transform, if there is no property binding active
on this reference frame, if it ever shows up in a profile.

For filters, rely on the new Picture tree functionality and resolve
the opacity filter value when preparing the picture primitive for
rendering. If the property resolves to an invisible filter, then
early out from this entire picture primitive.

Also update the animation example to demonstrate animating opacity.

Fixes servo#1921.
glennw pushed a commit to glennw/webrender that referenced this issue Nov 15, 2017
Instead of rebuilding the entire scene / frame when scrolling while
property bindings are present, resolve the animated properties as
we prepare primitives and update the clip-scroll tree.

For transforms, reference frames now retain the property binding
information and build the correct transform in update_node(). We
could possibly optimize this in the future to not always rebuild
the reference frame transform, if there is no property binding active
on this reference frame, if it ever shows up in a profile.

For filters, rely on the new Picture tree functionality and resolve
the opacity filter value when preparing the picture primitive for
rendering. If the property resolves to an invisible filter, then
early out from this entire picture primitive.

Also update the animation example to demonstrate animating opacity.

Fixes servo#1921.
bors-servo added a commit that referenced this issue Nov 16, 2017
Don't rebuild the entire scene when scrolling with property bindings.

Instead of rebuilding the entire scene / frame when scrolling while
property bindings are present, resolve the animated properties as
we prepare primitives and update the clip-scroll tree.

For transforms, reference frames now retain the property binding
information and build the correct transform in update_node(). We
could possibly optimize this in the future to not always rebuild
the reference frame transform, if there is no property binding active
on this reference frame, if it ever shows up in a profile.

For filters, rely on the new Picture tree functionality and resolve
the opacity filter value when preparing the picture primitive for
rendering. If the property resolves to an invisible filter, then
early out from this entire picture primitive.

Also update the animation example to demonstrate animating opacity.

Fixes #1921.

<!-- 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/2043)
<!-- Reviewable:end -->
GuanWen-Chen added a commit to GuanWen-Chen/webrender that referenced this issue Jan 17, 2018
Instead of rebuilding the entire scene / frame when scrolling while
property bindings are present, resolve the animated properties as
we prepare primitives and update the clip-scroll tree.

For transforms, reference frames now retain the property binding
information and build the correct transform in update_node(). We
could possibly optimize this in the future to not always rebuild
the reference frame transform, if there is no property binding active
on this reference frame, if it ever shows up in a profile.

For filters, rely on the new Picture tree functionality and resolve
the opacity filter value when preparing the picture primitive for
rendering. If the property resolves to an invisible filter, then
early out from this entire picture primitive.

Also update the animation example to demonstrate animating opacity.

Fixes servo#1921.
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.

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