[WIP] Optimize the SaveLayer operation
Description:
- Create a PaintTree during the traversal tree phase, the PaintTree node is the AttributeLayer which set the paint attribute and it needs to
saveLayer - In the DisplayListLayer we can get all the PaintTree nodes, and to compress the
saveLayerop - In the AttributeLayer, we don't do the
saveLayerop, instead, we create a PaintTree node and insert the node to the PaintTree.
- [x] Recording the attribute in a DlPaint
- [ ] Quick check which attribute is set in DlPaint
- [ ] Check if DlPaint is compatible with DLLayer's display_list
cc @flar
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!).
If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?
Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.
Currently, we create a PaintNodeTree and every Layer Node will connect to a PaintNode. For the leaf node DLLayer, we can get a PaintNode branch which through parent can get all the saveLayer attributes, ex: for the DLLayer3 connect the ImageFilterPaintNode it can use Parent to get the Opacity and more.
Cause for the leaf node or Container node can get all the saveLayer attributes, so we can optimize some SaveLayer op.
cc @flar
This pull request executed golden file tests, but it has not been updated in a while (20+ days). Test results from Gold expire after as many days, so this pull request will need to be updated with a fresh commit in order to get results from Gold.
@JsouLiang is this PR still on your radar?