engine icon indicating copy to clipboard operation
engine copied to clipboard

[WIP] Optimize the SaveLayer operation

Open JsouLiang opened this issue 3 years ago • 3 comments

Description:

  1. Create a PaintTree during the traversal tree phase, the PaintTree node is the AttributeLayer which set the paint attribute and it needs to saveLayer
  2. In the DisplayListLayer we can get all the PaintTree nodes, and to compress the saveLayer op
  3. In the AttributeLayer, we don't do the saveLayer op, 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

JsouLiang avatar Aug 08 '22 10:08 JsouLiang

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.

flutter-dashboard[bot] avatar Aug 08 '22 10:08 flutter-dashboard[bot]

image

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

JsouLiang avatar Aug 09 '22 06:08 JsouLiang

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.

flutter-dashboard[bot] avatar Sep 08 '22 09:09 flutter-dashboard[bot]

@JsouLiang is this PR still on your radar?

Hixie avatar Dec 07 '22 00:12 Hixie