-
Notifications
You must be signed in to change notification settings - Fork 6k
[iOS] Supported rendering platform views without merging the raster thread. #53826
Changes from 38 commits
02556ae
b3f6670
b31aae6
75f931a
4525bd8
6ce3aa0
be03cf8
6770376
912cd40
1f65cc3
53adc81
870b950
f8267bd
80565d5
2b9a825
0a7dc5a
2745e88
6002aa0
e7a832f
f099d74
e2e6a2a
44d5b5b
b53063a
9a84539
65a5210
735ce22
a4f523b
b6c3345
a4b771e
cd8e1de
6603d18
27c0daa
d794211
2f4314b
25a4e06
ea2e66d
d220885
9b534cd
970e13a
63ebe66
ff4802a
e3fc731
c0fab3b
d73671e
7285907
bcd8519
b25a742
5f6a8d4
be7853d
b19b4d8
ab08739
6e6e5a2
355ab30
8cd1c74
30e7b97
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,6 +26,9 @@ class SurfaceFrame { | |
| using SubmitCallback = | ||
| std::function<bool(SurfaceFrame& surface_frame, DlCanvas* canvas)>; | ||
|
|
||
| using DeferredSubmit = std::function<bool()>; | ||
| using SubmitReciever = std::function<void(DeferredSubmit)>; | ||
|
|
||
| // Information about the underlying framebuffer | ||
| struct FramebufferInfo { | ||
| // Indicates whether or not the surface supports pixel readback as used in | ||
|
|
@@ -87,6 +90,10 @@ class SurfaceFrame { | |
| // | ||
| // Defaults to true, which is generally a safe value. | ||
| bool frame_boundary = true; | ||
|
|
||
| bool present_with_transaction = false; | ||
cbracken marked this conversation as resolved.
Show resolved
Hide resolved
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I assume this is necessary for things to correctly work with FlutterMetalLayer disabled?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FlutterMetalLayer is always presenting with a CATransaction, right?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, it always makes the jump to platform thread (can't set CALayer content on background thread).
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Makes sense. I ported this over from the existing logic, but once we remove the old metal layer usage we could remove this as well.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| SubmitReciever submit_receiver; | ||
| }; | ||
|
|
||
| bool Submit(); | ||
|
|
||
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.
@chinmaygarde this is something I could use some help designing a better solution for.
Essentially what I need is to split SurfaceFrame submit into two methods, Flush and Submit (with the current Submit method being Flush+Submit). The flush would do everything up to presenting the drawable, while submit would actually do the presentation. That would allow us to finish the encoding work on the raster thread and then present from the platform thread as part of the CATransaction.
But this is complicated by all of the layers between SurfaceFrame and the impeller::Frame, and what to do about backends where a split Flush/Submit isn't feasible yet.
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.
We can sketch this offline but SurfaceFrame may be EOL of its use. How about a SurfaceFrameBuilder that creates a view hierarchy state representation that you can submit elsewhere?
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.
Walk me through it :)
Or throw some time on my calendar