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

Commit d217a95

Browse files
author
Jonah Williams
authored
Remove cullRect calculation on TransformLayers with a perspective transform. (#5693)
1 parent 13d801a commit d217a95

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

flow/layers/default_layer_builder.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,13 @@ DefaultLayerBuilder::~DefaultLayerBuilder() = default;
3737
void DefaultLayerBuilder::PushTransform(const SkMatrix& sk_matrix) {
3838
SkMatrix inverse_sk_matrix;
3939
SkRect cullRect;
40-
if (sk_matrix.invert(&inverse_sk_matrix)) {
40+
// Perspective projections don't produce rectangles that are useful for
41+
// culling for some reason.
42+
if (!sk_matrix.hasPerspective() && sk_matrix.invert(&inverse_sk_matrix)) {
4143
inverse_sk_matrix.mapRect(&cullRect, cull_rects_.top());
4244
} else {
4345
cullRect = kGiantRect;
4446
}
45-
4647
auto layer = std::make_unique<flow::TransformLayer>();
4748
layer->set_transform(sk_matrix);
4849
PushLayer(std::move(layer), cullRect);

shell/platform/darwin/ios/framework/Source/FlutterAppDelegate.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ - (void)application:(UIApplication*)application
129129

130130
- (BOOL)application:(UIApplication*)application
131131
continueUserActivity:(NSUserActivity*)userActivity
132-
restorationHandler:(void (^)(NSArray*))restorationHandler {
132+
restorationHandler:(void (^)(NSArray<id<UIUserActivityRestoring>>*))restorationHandler {
133133
return [_lifeCycleDelegate application:application
134134
continueUserActivity:userActivity
135135
restorationHandler:restorationHandler];

0 commit comments

Comments
 (0)