Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@dnfield
Copy link
Contributor

@dnfield dnfield commented Jun 22, 2022

Small step towards flutter/flutter#86634

Also will enable flutter/flutter#106381 more easily

Test gets updated because the scene.toImage call now actually sees more saveLayer activity from replaying the DL.

@dnfield dnfield requested review from flar and jason-simmons June 22, 2022 16:20
Copy link
Contributor

@flar flar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, but with a mystery question.

}
expect(saveLayerRecordCount, 3);
expect(saveLayerCount, 3);
expect(saveLayerCount, 6);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did this change from 3 to 6? That seems odd, like we are getting double-accounting here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it's because scene.toImage now replays the display list.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, actually, it is because the leaf_nodes_builder is not set so DisplayListLayer::Paint will replay its DL into the flattened DL rather than inserting it by reference. Then later the flattened DL will replay the saveLayer calls a second time and they will be double-accounted.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants