From 9a9d7e1add67c1e14ad1fc2c5fd3ecb4bdf965c8 Mon Sep 17 00:00:00 2001 From: cyanglaz Date: Tue, 5 May 2020 11:51:28 -0700 Subject: [PATCH 1/4] Fix active_composition_order_ never cleared --- .../darwin/ios/framework/Source/FlutterPlatformViews.mm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm index 14a45142eb9b3..0859ef9a4feec 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm @@ -563,6 +563,7 @@ // If a layer was allocated in the previous frame, but it's not used in the current frame, // then it can be removed from the scene. RemoveUnusedLayers(); + // Organize the layers by their z indexes. BringLayersIntoView(platform_view_layers); // Mark all layers as available, so they can be used in the next frame. @@ -576,6 +577,7 @@ void FlutterPlatformViewsController::BringLayersIntoView(LayersMap layer_map) { UIView* flutter_view = flutter_view_.get(); auto zIndex = 0; + active_composition_order_.clear(); for (size_t i = 0; i < composition_order_.size(); i++) { int64_t platform_view_id = composition_order_[i]; std::vector> layers = layer_map[platform_view_id]; From 2b5430495254f87d404241d33e029d55932cbf30 Mon Sep 17 00:00:00 2001 From: cyanglaz Date: Tue, 5 May 2020 11:53:32 -0700 Subject: [PATCH 2/4] cleanup --- .../platform/darwin/ios/framework/Source/FlutterPlatformViews.mm | 1 - 1 file changed, 1 deletion(-) diff --git a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm index 0859ef9a4feec..625316cc78152 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm @@ -563,7 +563,6 @@ // If a layer was allocated in the previous frame, but it's not used in the current frame, // then it can be removed from the scene. RemoveUnusedLayers(); - // Organize the layers by their z indexes. BringLayersIntoView(platform_view_layers); // Mark all layers as available, so they can be used in the next frame. From d7359641ecf41871e3eab01c7975220c903a3cc4 Mon Sep 17 00:00:00 2001 From: cyanglaz Date: Tue, 5 May 2020 12:00:58 -0700 Subject: [PATCH 3/4] comment --- .../platform/darwin/ios/framework/Source/FlutterPlatformViews.mm | 1 + 1 file changed, 1 insertion(+) diff --git a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm index 625316cc78152..168a463123a8c 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm @@ -576,6 +576,7 @@ void FlutterPlatformViewsController::BringLayersIntoView(LayersMap layer_map) { UIView* flutter_view = flutter_view_.get(); auto zIndex = 0; + // Clear the `active_composition_order_`, which will be populated down below. active_composition_order_.clear(); for (size_t i = 0; i < composition_order_.size(); i++) { int64_t platform_view_id = composition_order_[i]; From 8cf578d8af0be38ef9c81ef0217519f1e7b4ee07 Mon Sep 17 00:00:00 2001 From: cyanglaz Date: Tue, 5 May 2020 14:29:00 -0700 Subject: [PATCH 4/4] Trigger ci