Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Process all transform mutators before clipping #50386

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -476,11 +476,26 @@ static bool ClipRRectContainsPlatformViewBoundingRect(const SkRRect& clip_rrect,
clipView.maskView = nil;
}
CGFloat screenScale = [UIScreen mainScreen].scale;

// Flatten all transforms into one, to be applied to clipping logic.
auto transformIter = mutators_stack.Begin();
while (transformIter != mutators_stack.End()) {
switch ((*transformIter)->GetType()) {
case kTransform: {
transformMatrix.preConcat((*transformIter)->GetMatrix());
break;
}
default:
break;
}
++transformIter;
}

auto iter = mutators_stack.Begin();
while (iter != mutators_stack.End()) {
switch ((*iter)->GetType()) {
case kTransform: {
transformMatrix.preConcat((*iter)->GetMatrix());
// Already handled above.
break;
}
case kClipRect: {
Expand Down
4 changes: 2 additions & 2 deletions testing/ios/IosUnitTests/Tests/FlutterEngineConfig.xcconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FLUTTER_ENGINE[arch=x86_64]=ios_debug_sim_unopt
FLUTTER_ENGINE[arch=x86_64]=ios_debug_sim_unopt_arm64
FLUTTER_ENGINE[arch=arm64]=ios_debug_sim_unopt_arm64
FLUTTER_ENGINE=ios_debug_sim_unopt
FLUTTER_ENGINE=ios_debug_sim_unopt_arm64