-
Notifications
You must be signed in to change notification settings - Fork 6k
Allow for dynamic thread merging on IOS for embedded view mutations #9819
Conversation
f2f discussion: the requirement to merge threads in order to do platform view operations is iOS specific, we feel like we should move relevant logic out of platform agnostic classes like compositor_context and into the view embedder. |
After pre-roll we know if there have been any mutations made to the IOS embedded UIViews. If there are any mutations and the thread configuration is such chat the mutations will be committed on an illegal thread (GPU thread), we merge the threads and keep them merged until the lease expires. The lease is currently set to expire after 10 frames of no mutations. If there are any mutations in the interim we extend the lease. TaskRunnerMerger will ultimately be responsible for enforcing the correct thread configurations. This configuration will be inactive even after this change since still use the same thread when we create the iOS engine. That is slated to change in the coming PRs.
f1ec786
to
e26d65d
Compare
flow/compositor_context.h
Outdated
#include "third_party/skia/include/core/SkCanvas.h" | ||
#include "third_party/skia/include/core/SkPictureRecorder.h" | ||
|
||
namespace flutter { | ||
|
||
class LayerTree; | ||
|
||
enum class RasterStatus { kSuccess, kFailed }; | ||
enum class RasterStatus { kSuccess, kResubmit, kEnqueuePipeline, kFailed }; |
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.
Can you document the meaning of each of these?
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
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.
uber nit: may be more readable to inline the comment before each enum value.
flow/compositor_context.h
Outdated
|
||
// This is the number of frames the task runners will stay | ||
// merged after a frame where we see a mutation to the embedded views. | ||
static const int kDefaultMergedLeaseDuration = 10; |
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.
The notion of merging/unmerging threads for platform views is a platform specific. Feels wrong to have this platform agnostic class know about it.
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.
This is an outdated version :-)
flow/compositor_context.cc
Outdated
|
||
bool CompositorContext::ScopedFrame::MergeTaskRunnersForEmbeddedViews() { | ||
if (view_embedder_ && task_runner_merger_) { | ||
const bool uiviews_mutated = view_embedder_->HasPendingViewOperations(); |
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.
nit: I woudn't use the uiviews term here, this file should be platform agnostic, maybe call pending_operations
?
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.
This is an outdated version :-)
flow/embedded_views.h
Outdated
@@ -205,6 +206,15 @@ class ExternalViewEmbedder { | |||
int view_id, | |||
std::unique_ptr<EmbeddedViewParams> params) = 0; | |||
|
|||
// This needs to get called after |Preroll| finishes on the layer tree. | |||
// Returns false if the frame needs to be processed again, this is after | |||
// it does any requisite tasks needed to bring itseld to a valid state. |
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.
nit: typo
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
flow/embedded_views.h
Outdated
// Returns false if the frame needs to be processed again, this is after | ||
// it does any requisite tasks needed to bring itseld to a valid state. | ||
// Returns true if the view embedder is already in a valid state. | ||
virtual bool PostPrerollAction( |
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.
Do we still need HadPendingViewOperations?
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.
Nope. Made it private only on FlutterViewsController
@@ -131,6 +133,10 @@ class FlutterPlatformViewsController { | |||
GrContext* overlays_gr_context_; | |||
SkISize frame_size_; | |||
|
|||
// This is the number of frames the task runners will stay | |||
// merged after a frame where we see a mutation to the embedded views. | |||
static const int kDefaultMergedLeaseDuration = 10; |
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.
Say something about how you picked this number (even if it's completely arbitrary would be useful to record that for the next person coming to revisit this number to know)
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/pipeline.h
Outdated
@@ -138,6 +138,9 @@ class Pipeline : public fml::RefCountedThreadSafe<Pipeline<R>> { | |||
|
|||
{ | |||
std::scoped_lock lock(queue_mutex_); | |||
if (queue_.empty()) { |
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.
Can you add a comment explaining how it can be empty
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 was worried about ProducerCommitFront
popping queue entries. But depth_
can only be set during the creation of the pipeline.
It was a safety check that should never be triggered. Maybe worth adding it as a FML_DCHECK
at some point, but i removed it for now.
shell/common/rasterizer.cc
Outdated
last_layer_tree_ = std::move(layer_tree); | ||
} else if (raster_status == RasterStatus::kResubmit) { | ||
last_layer_tree_ = std::move(layer_tree); |
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 to confirm that the semantic change of last_layer_tree_
from "the last layer tree that was rasterized" to the "last layer tree that attempted to be rasterized and have not yet failed or have rasterized successfully" makes sense. Actually it being non trivial to describe maybe hints that we should just add another member just for the new purpose, resubmitted_layer_tree_
?
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.
Agreed. It does not really make sense to re-purpose the current field. Will create a new member.
shell/common/rasterizer.cc
Outdated
@@ -146,6 +178,12 @@ void Rasterizer::DoDraw(std::unique_ptr<flutter::LayerTree> layer_tree) { | |||
// for Fuchsia to capture SceneUpdateContext::ExecutePaintTasks. | |||
timing.Set(FrameTiming::kRasterFinish, fml::TimePoint::Now()); | |||
delegate_.OnFrameRasterized(timing); | |||
|
|||
if (task_runner_merger_ && task_runner_merger_->DecrementLease()) { | |||
return RasterStatus::kEnqueuePipeline; |
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.
This is not trivial to parse, can you add a comment?
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.
Yup. It is a tricky case. Added a comment.
@@ -263,8 +301,9 @@ static sk_sp<SkData> ScreenshotLayerTreeAsImage( | |||
SkMatrix root_surface_transformation; | |||
root_surface_transformation.reset(); | |||
|
|||
auto frame = compositor_context.AcquireFrame( | |||
surface_context, canvas, nullptr, root_surface_transformation, false); | |||
auto frame = compositor_context.AcquireFrame(surface_context, canvas, nullptr, |
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.
@cyanglaz is just adding screenshot support, would it have any unwanted side affects to pass in the thread merger?
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.
My prototype doesn't rely on Skia to take screenshot, rather uses completely iOS apis. So the plan is to somehow check if there are embedded_views and if so, use the screenshot directly from the API that is provided from embedded views (iOS's PlatformViewController).
I am not too familiar with the thread merging but my guess is it won't affect the current behavior.
Need @iskakaushik' confirm or have a offline discussion about it.
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.
AFAIK for @cyanglaz 's screenshot change, the screenshot needs to happen on the platform thread since it operates on CALayers
. It would make sense to keep the threads merged during the screenshot duration as its a rather rare operation.
I can help make that change.
flow/compositor_context.h
Outdated
#include "third_party/skia/include/core/SkCanvas.h" | ||
#include "third_party/skia/include/core/SkPictureRecorder.h" | ||
|
||
namespace flutter { | ||
|
||
class LayerTree; | ||
|
||
enum class RasterStatus { kSuccess, kFailed }; | ||
enum class RasterStatus { kSuccess, kResubmit, kEnqueuePipeline, kFailed }; |
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.
uber nit: may be more readable to inline the comment before each enum value.
flow/embedded_views.h
Outdated
// Returns false if the frame needs to be processed again, this is after | ||
// it does any requisite tasks needed to bring itseld to a valid state. | ||
// Returns true if the view embedder is already in a valid state. | ||
virtual bool PostPrerollAction( |
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.
ping
fml/gpu_thread_merger.h
Outdated
// unless an |ExtendLease| gets called. | ||
void MergeWithLease(size_t lease_term); | ||
|
||
void ExtendLease(size_t lease_term); |
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.
The guarantee of this method to the caller is that the threads will stay merged for at least the lease_term they call with. If another caller tries to reduce the current lease term, we should still have the bigger lease term. In the existing implementation we do not ever call this with a smaller lease term than before, but I think of it as extending as we would never want to lower the lease term.
I can imagine a world where we want to reduce the lease after disposing all platform views.
Anyway not a big deal, I just thought it will be a little easier to follow as SetLease
but I'm ok with keeping it this way if that is your preference, I still find it a little confusing e.g ExtendLease(3)
sounds to me like we're extending the current lease by 3, if you want to keep current behavior maybe make it ExtendLeaseTo(3)
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 like ExtendLeaseTo
I see your point about SetLease
but i'm worried about setting the lease to a lower time and cause unintended consequences. Changed it.
fml/gpu_thread_merger.h
Outdated
// Returns true if the the current thread does *not* own rasterizing. | ||
// When the threads are merged, platform thread owns rasterizing. | ||
// When un-merged, gpu thread owns rasterizing. | ||
bool IsNotOnRasterizingThread(); |
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.
uber nit: consider making this IsOnRasterizingThread
e.g if it ever gets used as if (!IsNotOnRasterizingThread())
it start to get confusing.
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
fml/gpu_thread_merger.h
Outdated
|
||
void ExtendLease(size_t lease_term); | ||
|
||
// Returns true if this call resulted in splitting the |
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.
update comment
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.
@@ -135,8 +162,13 @@ void Rasterizer::DoDraw(std::unique_ptr<flutter::LayerTree> layer_tree) { | |||
PersistentCache* persistent_cache = PersistentCache::GetCacheForProcess(); | |||
persistent_cache->ResetStoredNewShaders(); | |||
|
|||
if (DrawToSurface(*layer_tree) == RasterStatus::kSuccess) { | |||
RasterStatus raster_status = DrawToSurface(*layer_tree); |
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.
Are we calling DrawToSurface twice on purpose?
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.
🤦♂️ typo.
flow/compositor_context.h
Outdated
// only called when thread configuration change occurs. | ||
// | ||
// kEnqueuePipeline: frame has been successfully rasterized, but pipeline | ||
// pressure needs to be re-applied. This is currently only called when thread |
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.
nit: I wasn't sure what "pipleline pressure" meant, consider saying more explicitly "there are additional items in the pipeline waiting to be consumed"
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
@@ -401,12 +402,14 @@ class Rasterizer final { | |||
std::unique_ptr<Surface> surface_; | |||
std::unique_ptr<flutter::CompositorContext> compositor_context_; | |||
std::unique_ptr<flutter::LayerTree> last_layer_tree_; | |||
std::unique_ptr<flutter::LayerTree> resubmitted_layer_tree_; |
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.
nit: a comment here may be helpful for someone skimming over this header
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.
Added a comment to both this and the last_layer_tree
fields.
if (lease_term_ == 0) { | ||
bool success = task_queues_->Unmerge(platform_queue_id_); | ||
is_merged_ = !success; | ||
return GpuThreadStatus::kUnmergedNow; |
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.
Should we return kUnmergedNow
if Unmerge
failed?
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 point. Adding an FML_CHECK
to ensure that we error out on failure. This should not happen.
fml::RefPtr<fml::GpuThreadMerger> gpu_thread_merger) { | ||
const bool uiviews_mutated = HasPendingViewOperations(); | ||
if (uiviews_mutated) { | ||
bool are_merged = gpu_thread_merger->IsMerged(); |
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.
nit: is_merged
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.
The name is also clean enough now that I'm not sure the stack variable is needed
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
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.
LGTM (with a tiny nit)
Exciting!
fml/gpu_thread_merger.cc
Outdated
@@ -63,6 +63,7 @@ GpuThreadStatus GpuThreadMerger::DecrementLease() { | |||
lease_term_--; | |||
if (lease_term_ == 0) { | |||
bool success = task_queues_->Unmerge(platform_queue_id_); | |||
FML_CHECK(success) << "Unable to un-merge the GPU and platform threads."; | |||
is_merged_ = !success; |
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.
nit: this can now be is_merged_ = false
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!
This looks like it's broken on LUCI: https://cr-buildbucket.appspot.com/build/8905302546475885360 |
git@github.com:flutter/engine.git/compare/ff49ca1c6e5b...7dfdfc6 git log ff49ca1..7dfdfc6 --no-merges --oneline 2019-08-13 skia-flutter-autoroll@skia.org Roll src/third_party/skia b875cc709c7f..f99631100372 (2 commits) (flutter/engine#10974) 2019-08-13 bkonyi@google.com Roll src/third_party/dart 06509e333d..9aea1f3489 (8 commits) 2019-08-13 dnfield@google.com Expose isolateId for engine (flutter/engine#10823) 2019-08-13 bkonyi@google.com Roll src/third_party/dart baebba06af..06509e333d (7 commits) 2019-08-13 skia-flutter-autoroll@skia.org Roll fuchsia/sdk/core/linux-amd64 from u8FN9... to z99ul... (flutter/engine#10972) 2019-08-13 skia-flutter-autoroll@skia.org Roll src/third_party/skia ef0406f04761..b875cc709c7f (4 commits) (flutter/engine#10970) 2019-08-13 50503328+flar@users.noreply.github.com include zx::clock from new location to fix Fuchsia autoroll. (flutter/engine#10968) 2019-08-13 mklim@google.com Change SemanticsNode#children lists to be non-null (flutter/engine#10952) 2019-08-13 bkonyi@google.com Roll src/third_party/dart b31df28d72..baebba06af (5 commits) 2019-08-12 bkonyi@google.com Roll src/third_party/dart 896c053803..b31df28d72 (10 commits) 2019-08-12 stuartmorgan@google.com Increase the license block scan from 5k to 6k (flutter/engine#10956) 2019-08-12 iska.kaushik@gmail.com Fix format (flutter/engine#10955) 2019-08-12 skia-flutter-autoroll@skia.org Roll src/third_party/skia 8d1b0bceedd6..ef0406f04761 (8 commits) (flutter/engine#10954) 2019-08-12 bkonyi@google.com Roll src/third_party/dart 32b70ce2a5..896c053803 (1 commits) 2019-08-12 iska.kaushik@gmail.com Fix iOS references to PostPrerollResult (flutter/engine#10949) 2019-08-12 iska.kaushik@gmail.com Allow for dynamic thread merging on IOS for embedded view mutations (flutter/engine#9819) 2019-08-12 mklim@google.com Report JUnit test failures (flutter/engine#10941) 2019-08-12 qxyat2019@gmail.com Fix iOS keyboard crash (flutter/engine#10656) 2019-08-12 jerryzhoujw@gmail.com Bump local podspec's iOS deployment target from 7.0 to 8.0 (flutter/engine#10662) 2019-08-12 skia-flutter-autoroll@skia.org Roll src/third_party/skia c2da70fbef53..8d1b0bceedd6 (2 commits) (flutter/engine#10937) 2019-08-12 bkonyi@google.com Roll src/third_party/dart 9adf3c119e..32b70ce2a5 (3 commits) 2019-08-12 dnfield@google.com iOS JIT support and enhancements for scenarios app (flutter/engine#10820) 2019-08-12 bkonyi@google.com Roll src/third_party/dart 261fd6266b..9adf3c119e (2 commits) 2019-08-12 skia-flutter-autoroll@skia.org Roll src/third_party/skia da037b85352e..c2da70fbef53 (1 commits) (flutter/engine#10924) 2019-08-12 skia-flutter-autoroll@skia.org Roll src/third_party/skia a47c48ef6bce..da037b85352e (3 commits) (flutter/engine#10909) 2019-08-12 bkonyi@google.com Roll src/third_party/dart e29d6d0ecb..261fd6266b (2 commits) 2019-08-12 skia-flutter-autoroll@skia.org Roll src/third_party/skia 9c23a9e790b2..a47c48ef6bce (1 commits) (flutter/engine#10896) 2019-08-11 skia-flutter-autoroll@skia.org Roll src/third_party/skia 5e7271a4598e..9c23a9e790b2 (1 commits) (flutter/engine#10838) 2019-08-11 skia-flutter-autoroll@skia.org Roll src/third_party/skia 3e7fa79f2c79..5e7271a4598e (1 commits) (flutter/engine#10827) 2019-08-10 skia-flutter-autoroll@skia.org Roll fuchsia/sdk/core/linux-amd64 from bvUCO... to xqsy5... (flutter/engine#10826) 2019-08-10 skia-flutter-autoroll@skia.org Roll src/third_party/skia 89e43889afd9..3e7fa79f2c79 (1 commits) (flutter/engine#10825) 2019-08-10 skia-flutter-autoroll@skia.org Roll src/third_party/skia fe19203eb7d7..89e43889afd9 (1 commits) (flutter/engine#10824) 2019-08-10 skia-flutter-autoroll@skia.org Roll fuchsia/sdk/core/linux-amd64 from HsuAH... to bvUCO... (flutter/engine#10822) 2019-08-10 bkonyi@google.com Roll src/third_party/dart ffefa124a7..e29d6d0ecb (4 commits) 2019-08-10 skia-flutter-autoroll@skia.org Roll src/third_party/skia af89d3972e0b..fe19203eb7d7 (5 commits) (flutter/engine#10819) 2019-08-10 bkonyi@google.com Roll src/third_party/dart 15a3bf82cb..ffefa124a7 (11 commits) 2019-08-09 chris@bracken.jp Roll Dart SDK 78ce916d82..15a3bf82cb (flutter/engine#10810) 2019-08-09 skia-flutter-autoroll@skia.org Roll src/third_party/skia b7b0b3ad538c..af89d3972e0b (7 commits) (flutter/engine#10812) 2019-08-09 jonahwilliams@google.com Revert "Remove flutter_kernel_sdk dart script (#10808)" (flutter/engine#10811) 2019-08-09 iska.kaushik@gmail.com [dart:zircon] Porting Cache re-usable handle wait objects (flutter/engine#10809) 2019-08-09 jonahwilliams@google.com Remove flutter_kernel_sdk dart script (flutter/engine#10808) 2019-08-09 cfontas@google.com change add part to add child (flutter/engine#10787) 2019-08-09 yjbanov@google.com rename stub_ui to web_ui (flutter/engine#10776) 2019-08-09 kpozin@google.com [fuchsia] Migrate from custom FuchsiaFontManager to SkFontMgr_fuchsia (flutter/engine#10700) 2019-08-09 skia-flutter-autoroll@skia.org Roll src/third_party/skia 26cedb4c603b..b7b0b3ad538c (11 commits) (flutter/engine#10807) ...
flutter/engine@be4c8338a Roll src/third_party/dart 20407e28db..45f892df68 (2 commits) flutter/engine@da352d0f7 Revert "Track detailed LibTxt metrics with LineMetrics(flutter/engine#10127)" (flutter/engine#10982) flutter/engine@23700fc1e Roll src/third_party/dart b9217efc77..20407e28db (6 commits) flutter/engine@07f2cfa0e Roll src/third_party/skia 6e1b7bb2b5df..cd8b6d5c1cb8 (10 commits) (flutter/engine#10980) flutter/engine@7711efbf0 Return an empty mapping for an empty file asset (flutter/engine#10815) flutter/engine@663f9a9e1 Roll src/third_party/skia 6ef31815a694..6e1b7bb2b5df (1 commits) (flutter/engine#10979) flutter/engine@0a0a14202 Roll fuchsia/sdk/core/linux-amd64 from z99ul... to j8BvV... (flutter/engine#10978) flutter/engine@e13df85ce Roll src/third_party/dart 9aea1f3489..b9217efc77 (7 commits) flutter/engine@d0698f275 Roll src/third_party/skia f99631100372..6ef31815a694 (3 commits) (flutter/engine#10976) flutter/engine@7dfdfc6fa Roll src/third_party/skia b875cc709c7f..f99631100372 (2 commits) (flutter/engine#10974) flutter/engine@274659564 Roll src/third_party/dart 06509e333d..9aea1f3489 (8 commits) flutter/engine@e22893966 Expose isolateId for engine (flutter/engine#10823) flutter/engine@a18fa3722 Roll src/third_party/dart baebba06af..06509e333d (7 commits) flutter/engine@5909cf930 Roll fuchsia/sdk/core/linux-amd64 from u8FN9... to z99ul... (flutter/engine#10972) flutter/engine@144007da5 Roll src/third_party/skia ef0406f04761..b875cc709c7f (4 commits) (flutter/engine#10970) flutter/engine@6a4dfa7aa include zx::clock from new location to fix Fuchsia autoroll. (flutter/engine#10968) flutter/engine@ed88d0a44 Change SemanticsNode#children lists to be non-null (flutter/engine#10952) flutter/engine@853464e36 Roll src/third_party/dart b31df28d72..baebba06af (5 commits) flutter/engine@fb317b085 Roll src/third_party/dart 896c053803..b31df28d72 (10 commits) flutter/engine@20b7ea234 Increase the license block scan from 5k to 6k (flutter/engine#10956) flutter/engine@a438469aa Fix format (flutter/engine#10955) flutter/engine@70dd606ba Roll src/third_party/skia 8d1b0bceedd6..ef0406f04761 (8 commits) (flutter/engine#10954) flutter/engine@cff3f3d66 Roll src/third_party/dart 32b70ce2a5..896c053803 (1 commits) flutter/engine@b5c198b69 Fix iOS references to PostPrerollResult (flutter/engine#10949) flutter/engine@971a63915 Allow for dynamic thread merging on IOS for embedded view mutations (flutter/engine#9819) flutter/engine@c92a0d992 Report JUnit test failures (flutter/engine#10941) flutter/engine@e95125aad Fix iOS keyboard crash (flutter/engine#10656) flutter/engine@a50ec07d5 Bump local podspec's iOS deployment target from 7.0 to 8.0 (flutter/engine#10662) flutter/engine@0ce28b100 Roll src/third_party/skia c2da70fbef53..8d1b0bceedd6 (2 commits) (flutter/engine#10937) flutter/engine@07ee128c2 Roll src/third_party/dart 9adf3c119e..32b70ce2a5 (3 commits) flutter/engine@79c50123a iOS JIT support and enhancements for scenarios app (flutter/engine#10820) flutter/engine@d3be62888 Roll src/third_party/dart 261fd6266b..9adf3c119e (2 commits) flutter/engine@68b749624 Roll src/third_party/skia da037b85352e..c2da70fbef53 (1 commits) (flutter/engine#10924) flutter/engine@d3523b9b7 Roll src/third_party/skia a47c48ef6bce..da037b85352e (3 commits) (flutter/engine#10909) flutter/engine@b39019d57 Roll src/third_party/dart e29d6d0ecb..261fd6266b (2 commits) flutter/engine@19f564acf Roll src/third_party/skia 9c23a9e790b2..a47c48ef6bce (1 commits) (flutter/engine#10896) flutter/engine@4099cb146 Roll src/third_party/skia 5e7271a4598e..9c23a9e790b2 (1 commits) (flutter/engine#10838) flutter/engine@a3fa41b3b Roll src/third_party/skia 3e7fa79f2c79..5e7271a4598e (1 commits) (flutter/engine#10827) flutter/engine@99355b086 Roll fuchsia/sdk/core/linux-amd64 from bvUCO... to xqsy5... (flutter/engine#10826) flutter/engine@8a068a1bd Roll src/third_party/skia 89e43889afd9..3e7fa79f2c79 (1 commits) (flutter/engine#10825) flutter/engine@ee6267d04 Roll src/third_party/skia fe19203eb7d7..89e43889afd9 (1 commits) (flutter/engine#10824) flutter/engine@7ad538dcc Roll fuchsia/sdk/core/linux-amd64 from HsuAH... to bvUCO... (flutter/engine#10822) flutter/engine@cbc2fe6e1 Roll src/third_party/dart ffefa124a7..e29d6d0ecb (4 commits) flutter/engine@0afba6b1f Roll src/third_party/skia af89d3972e0b..fe19203eb7d7 (5 commits) (flutter/engine#10819) flutter/engine@6c678bfca Roll src/third_party/dart 15a3bf82cb..ffefa124a7 (11 commits) flutter/engine@03caa67ac Roll Dart SDK 78ce916d82..15a3bf82cb (flutter/engine#10810) flutter/engine@e096f7830 Roll src/third_party/skia b7b0b3ad538c..af89d3972e0b (7 commits) (flutter/engine#10812) flutter/engine@cb1628986 Revert "Remove flutter_kernel_sdk dart script (flutter/engine#10808)" (flutter/engine#10811) flutter/engine@42afb1abb [dart:zircon] Porting Cache re-usable handle wait objects (flutter/engine#10809) flutter/engine@1b287524e Remove flutter_kernel_sdk dart script (flutter/engine#10808) flutter/engine@58f4f27a4 change add part to add child (flutter/engine#10787) flutter/engine@708fc625d rename stub_ui to web_ui (flutter/engine#10776) flutter/engine@70de3ec2c [fuchsia] Migrate from custom FuchsiaFontManager to SkFontMgr_fuchsia (flutter/engine#10700) flutter/engine@e0beaff61 Roll src/third_party/skia 26cedb4c603b..b7b0b3ad538c (11 commits) (flutter/engine#10807) flutter/engine@83b640d4b Rename flutter_java.jar and flutter_engine.jar so they match the Maven comvention (flutter/engine#10797) flutter/engine@c5d3c90d9 Roll fuchsia/sdk/core/linux-amd64 from 9xVXx... to HsuAH... (flutter/engine#10806) flutter/engine@97326b242 Roll src/third_party/dart 3d9a356f6e..78ce916d82 (7 commits) flutter/engine@086c0d50e Roll src/third_party/skia b2151310068b..26cedb4c603b (1 commits) (flutter/engine#10804) flutter/engine@1c75ee7c0 Roll src/third_party/skia 059bf776c184..b2151310068b (3 commits) (flutter/engine#10803) flutter/engine@2611a6eef Roll src/third_party/dart f29f41f1a5..3d9a356f6e (65 commits) flutter/engine@09a05f8b9 Roll src/third_party/skia 4d557e3df433..059bf776c184 (1 commits) (flutter/engine#10801)
flutter/engine@be4c8338a Roll src/third_party/dart 20407e28db..45f892df68 (2 commits) flutter/engine@da352d0f7 Revert "Track detailed LibTxt metrics with LineMetrics(flutter/engine#10127)" (flutter/engine#10982) flutter/engine@23700fc1e Roll src/third_party/dart b9217efc77..20407e28db (6 commits) flutter/engine@07f2cfa0e Roll src/third_party/skia 6e1b7bb2b5df..cd8b6d5c1cb8 (10 commits) (flutter/engine#10980) flutter/engine@7711efbf0 Return an empty mapping for an empty file asset (flutter/engine#10815) flutter/engine@663f9a9e1 Roll src/third_party/skia 6ef31815a694..6e1b7bb2b5df (1 commits) (flutter/engine#10979) flutter/engine@0a0a14202 Roll fuchsia/sdk/core/linux-amd64 from z99ul... to j8BvV... (flutter/engine#10978) flutter/engine@e13df85ce Roll src/third_party/dart 9aea1f3489..b9217efc77 (7 commits) flutter/engine@d0698f275 Roll src/third_party/skia f99631100372..6ef31815a694 (3 commits) (flutter/engine#10976) flutter/engine@7dfdfc6fa Roll src/third_party/skia b875cc709c7f..f99631100372 (2 commits) (flutter/engine#10974) flutter/engine@274659564 Roll src/third_party/dart 06509e333d..9aea1f3489 (8 commits) flutter/engine@e22893966 Expose isolateId for engine (flutter/engine#10823) flutter/engine@a18fa3722 Roll src/third_party/dart baebba06af..06509e333d (7 commits) flutter/engine@5909cf930 Roll fuchsia/sdk/core/linux-amd64 from u8FN9... to z99ul... (flutter/engine#10972) flutter/engine@144007da5 Roll src/third_party/skia ef0406f04761..b875cc709c7f (4 commits) (flutter/engine#10970) flutter/engine@6a4dfa7aa include zx::clock from new location to fix Fuchsia autoroll. (flutter/engine#10968) flutter/engine@ed88d0a44 Change SemanticsNode#children lists to be non-null (flutter/engine#10952) flutter/engine@853464e36 Roll src/third_party/dart b31df28d72..baebba06af (5 commits) flutter/engine@fb317b085 Roll src/third_party/dart 896c053803..b31df28d72 (10 commits) flutter/engine@20b7ea234 Increase the license block scan from 5k to 6k (flutter/engine#10956) flutter/engine@a438469aa Fix format (flutter/engine#10955) flutter/engine@70dd606ba Roll src/third_party/skia 8d1b0bceedd6..ef0406f04761 (8 commits) (flutter/engine#10954) flutter/engine@cff3f3d66 Roll src/third_party/dart 32b70ce2a5..896c053803 (1 commits) flutter/engine@b5c198b69 Fix iOS references to PostPrerollResult (flutter/engine#10949) flutter/engine@971a63915 Allow for dynamic thread merging on IOS for embedded view mutations (flutter/engine#9819) flutter/engine@c92a0d992 Report JUnit test failures (flutter/engine#10941) flutter/engine@e95125aad Fix iOS keyboard crash (flutter/engine#10656) flutter/engine@a50ec07d5 Bump local podspec's iOS deployment target from 7.0 to 8.0 (flutter/engine#10662) flutter/engine@0ce28b100 Roll src/third_party/skia c2da70fbef53..8d1b0bceedd6 (2 commits) (flutter/engine#10937) flutter/engine@07ee128c2 Roll src/third_party/dart 9adf3c119e..32b70ce2a5 (3 commits) flutter/engine@79c50123a iOS JIT support and enhancements for scenarios app (flutter/engine#10820) flutter/engine@d3be62888 Roll src/third_party/dart 261fd6266b..9adf3c119e (2 commits) flutter/engine@68b749624 Roll src/third_party/skia da037b85352e..c2da70fbef53 (1 commits) (flutter/engine#10924) flutter/engine@d3523b9b7 Roll src/third_party/skia a47c48ef6bce..da037b85352e (3 commits) (flutter/engine#10909) flutter/engine@b39019d57 Roll src/third_party/dart e29d6d0ecb..261fd6266b (2 commits) flutter/engine@19f564acf Roll src/third_party/skia 9c23a9e790b2..a47c48ef6bce (1 commits) (flutter/engine#10896) flutter/engine@4099cb146 Roll src/third_party/skia 5e7271a4598e..9c23a9e790b2 (1 commits) (flutter/engine#10838) flutter/engine@a3fa41b3b Roll src/third_party/skia 3e7fa79f2c79..5e7271a4598e (1 commits) (flutter/engine#10827) flutter/engine@99355b086 Roll fuchsia/sdk/core/linux-amd64 from bvUCO... to xqsy5... (flutter/engine#10826) flutter/engine@8a068a1bd Roll src/third_party/skia 89e43889afd9..3e7fa79f2c79 (1 commits) (flutter/engine#10825) flutter/engine@ee6267d04 Roll src/third_party/skia fe19203eb7d7..89e43889afd9 (1 commits) (flutter/engine#10824) flutter/engine@7ad538dcc Roll fuchsia/sdk/core/linux-amd64 from HsuAH... to bvUCO... (flutter/engine#10822) flutter/engine@cbc2fe6e1 Roll src/third_party/dart ffefa124a7..e29d6d0ecb (4 commits) flutter/engine@0afba6b1f Roll src/third_party/skia af89d3972e0b..fe19203eb7d7 (5 commits) (flutter/engine#10819) flutter/engine@6c678bfca Roll src/third_party/dart 15a3bf82cb..ffefa124a7 (11 commits) flutter/engine@03caa67ac Roll Dart SDK 78ce916d82..15a3bf82cb (flutter/engine#10810) flutter/engine@e096f7830 Roll src/third_party/skia b7b0b3ad538c..af89d3972e0b (7 commits) (flutter/engine#10812) flutter/engine@cb1628986 Revert "Remove flutter_kernel_sdk dart script (flutter/engine#10808)" (flutter/engine#10811) flutter/engine@42afb1abb [dart:zircon] Porting Cache re-usable handle wait objects (flutter/engine#10809) flutter/engine@1b287524e Remove flutter_kernel_sdk dart script (flutter/engine#10808) flutter/engine@58f4f27a4 change add part to add child (flutter/engine#10787) flutter/engine@708fc625d rename stub_ui to web_ui (flutter/engine#10776) flutter/engine@70de3ec2c [fuchsia] Migrate from custom FuchsiaFontManager to SkFontMgr_fuchsia (flutter/engine#10700) flutter/engine@e0beaff61 Roll src/third_party/skia 26cedb4c603b..b7b0b3ad538c (11 commits) (flutter/engine#10807) flutter/engine@83b640d4b Rename flutter_java.jar and flutter_engine.jar so they match the Maven comvention (flutter/engine#10797) flutter/engine@c5d3c90d9 Roll fuchsia/sdk/core/linux-amd64 from 9xVXx... to HsuAH... (flutter/engine#10806) flutter/engine@97326b242 Roll src/third_party/dart 3d9a356f6e..78ce916d82 (7 commits) flutter/engine@086c0d50e Roll src/third_party/skia b2151310068b..26cedb4c603b (1 commits) (flutter/engine#10804) flutter/engine@1c75ee7c0 Roll src/third_party/skia 059bf776c184..b2151310068b (3 commits) (flutter/engine#10803) flutter/engine@2611a6eef Roll src/third_party/dart f29f41f1a5..3d9a356f6e (65 commits) flutter/engine@09a05f8b9 Roll src/third_party/skia 4d557e3df433..059bf776c184 (1 commits) (flutter/engine#10801)
In flutter/engine#9819, support for merging/unmerging the Flutter GPU thread and platform thread was landed to support better performance of platform views on iOS. This resulted in changes to the CompositorContext and ScopedFrame APIs which are also used by Fuchsia's flutter_runner. This is a breaking change approved in: https://bugs.fuchsia.dev/p/fuchsia/issues/detail?id=27323 Change-Id: I2140412ac686842b132c35a7f1300e3ba79e3749
After pre-roll we know if there have been any mutations made to the IOS embedded UIViews. If there are any mutations and the thread configuration is such chat the mutations will be committed on an illegal thread (GPU thread), we merge the threads and keep them merged until the lease expires. The lease is currently set to expire after 10 frames of no mutations. If there are any mutations in the interim we extend the lease.
TaskRunnerMerger will ultimately be responsible for enforcing the correct thread configurations.
This configuration will be inactive even after this change since still use the same thread when we create the iOS engine. That is slated to change in the coming PRs.