-
Notifications
You must be signed in to change notification settings - Fork 6k
Remove pipeline in favor of layer tree holder (#17688) #18285
Remove pipeline in favor of layer tree holder (#17688) #18285
Conversation
9732387 to
3474fa7
Compare
| ? 1 | ||
| : 2)), | ||
| #endif // FLUTTER_SHELL_ENABLE_METAL | ||
| layer_tree_holder_(std::make_shared<LayerTreeHolder>()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome.
| break; | ||
| // Note: This behaviour is left as-is to be inline with the pipeline | ||
| // semantics. TODO(kaushikiska): explore removing this block. | ||
| if (!layer_tree_holder->IsEmpty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whats making this method confusing to me is the re-submission logic. IMO, we should get rid of the resubmitted_layer_tree_ and have the caller to DoDraw (this frame) insert the layer tree that because of resubmit insert that tree back into the holder. We can then make DoDraw const so we its easier to read.
I believe we can get rid of this block if we say that whoever pushes a layertree to holder also has to perform a draw explicitly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an entire comment section below about how thread merging interacts with pipeline pressure that is now irrelevant and confusing(GitHub wont allow me to comment on that line in this patch but the link is here). I think we need to do a review of the documentation about to make sure outdated concepts are removed. Specifically, we need to make sure we have consistent documentation that discusses the following edge cases:
1: What happens when there is frame re-resubmission because of thread merging and unmerging?
2: What happens when new layer tree are not being produced in case of external texture composition?
Fortunately, this new world is simpler as there is no concept of pipeline backpressure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I 100% agree with this. One of the motivations for me to remove the pipeline mechanism is to facilitate easier thread merging and resubmission. I'd like to keep the thread merging behavior exactly the same for this commit and will simplify the resubmission logic along with clearing up some of the RasterStatus enums that are no longer valid.
|
|
||
| namespace flutter { | ||
|
|
||
| class LayerTreeHolder { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Documentation for this class. The following would be good to answer in this docset:
1: Who owns the holder?
2: Threading requirements.
3: Which components typically push and pop a layer trees?
4: What does the new-ness of layer trees mean exactly (clarify its the target time)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
shell/common/layer_tree_holder.h
Outdated
|
|
||
| bool IsEmpty() const; | ||
|
|
||
| std::unique_ptr<LayerTree> Get(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about PushIfNewer and Pop? Get implies a getter that is idempotent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea.
shell/common/layer_tree_holder.h
Outdated
|
|
||
| bool IsEmpty() const; | ||
|
|
||
| std::unique_ptr<LayerTree> Get(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[[nodiscard]]
shell/common/layer_tree_holder.h
Outdated
|
|
||
| class LayerTreeHolder { | ||
| public: | ||
| LayerTreeHolder() = default; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OOL these.
d3686ce to
57801c2
Compare
go/flutter-pipeline-improvements for more details.
57801c2 to
0b8fe08
Compare
* 9e3e3ba [web] Represent CSS identity transforms as 'none' instead of null (flutter/engine#18288) * 80fa77e Roll src/third_party/skia 3ebadcc98eab..056d543c91e0 (8 commits) (flutter/engine#18344) * 480d8e4 Fix scenario platform view tests on Android (flutter/engine#18332) * 0385664 Roll src/third_party/dart d6fed1f62444..29c00e28f350 (16 commits) (flutter/engine#18347) * 8371b44 Roll src/third_party/skia 056d543c91e0..71903997254f (7 commits) (flutter/engine#18350) * f321613 Add guards on FlValue methods to check for NULL values (flutter/engine#18226) * dc93db5 Move FlutterLoader disk I/O to a background thread to comply with Android strict mode (flutter/engine#18241) * bf1287c null-annotate lerp.dart, annotations.dart, channel_buffers.dart, hash_codes.dart (flutter/engine#18348) * 9600354 Add FlBasicMessageChannel (flutter/engine#18189) * df2dfac Roll src/third_party/skia 71903997254f..6c3db04c8b03 (9 commits) (flutter/engine#18361) * 5ad4f9e Add FlJsonMessageCodec (flutter/engine#18221) * 84ea892 Roll src/third_party/skia 6c3db04c8b03..7156db260239 (4 commits) (flutter/engine#18370) * f848069 Roll src/third_party/dart 29c00e28f350..f99631b12c4a (29 commits) (flutter/engine#18373) * c791ce9 Roll src/fuchsia/sdk/mac from gOhJW... to Vepm4... (flutter/engine#18377) * 5b62a63 Roll src/third_party/dart f99631b12c4a..e0257265d34e (2 commits) (flutter/engine#18378) * 0b41009 Roll src/third_party/skia 7156db260239..5b2ede3d0d44 (8 commits) (flutter/engine#18380) * 08b61ce Delete unused decode UTF-8, JSON functions (flutter/engine#18360) * 73d835c Roll src/third_party/dart e0257265d34e..2676764792b2 (4 commits) (flutter/engine#18383) * 9e166fb Roll src/third_party/skia 5b2ede3d0d44..39ec60aa8348 (5 commits) (flutter/engine#18384) * 2cdbc7f Remove pipeline in favor of layer tree holder (flutter/engine#18285) * 47513a7 Roll src/third_party/skia 39ec60aa8348..79c5674a4ca1 (3 commits) (flutter/engine#18389)
This reverts commit 2cdbc7f.
go/flutter-pipeline-improvements for more details.
flutter#18427) This reverts commit 2cdbc7f.
go/flutter-pipeline-improvements for more details.