Skip to content

Commit 9d8ac8f

Browse files
committed
Significantly improved panning performance when not using centerViewCornerRadius at all by not applying a mask to the IIViewDeckView.
Applying a mask to IIViewDeckView is a really bad idea in any case because it significantly hurts drawing performance!
1 parent 66414ea commit 9d8ac8f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ViewDeck/IIViewDeckController.m

+8
Original file line numberDiff line numberDiff line change
@@ -3249,6 +3249,10 @@ - (void)applyCenterViewOpacityIfNeeded {
32493249
#pragma mark - Center corner radius
32503250

32513251
- (void)setCenterViewCornerRadius:(CGFloat)centerViewCornerRadius {
3252+
if (centerViewCornerRadius == _centerViewCornerRadius) {
3253+
return;
3254+
}
3255+
32523256
_centerViewCornerRadius = centerViewCornerRadius;
32533257
[self applyCenterViewCornerRadiusAnimated:NO];
32543258
}
@@ -3278,6 +3282,10 @@ - (void)applyCenterViewCornerRadiusAnimated:(BOOL)animated {
32783282
UIBezierPath* path = [self generateCenterViewCornerRadiusPath];
32793283

32803284
if (!self.slidingControllerView.layer.mask) {
3285+
if (_centerViewCornerRadius == 0) {
3286+
return;
3287+
}
3288+
32813289
self.slidingControllerView.layer.mask = [CAShapeLayer layer];
32823290
((CAShapeLayer*)self.slidingControllerView.layer.mask).path = [path CGPath];
32833291
}

0 commit comments

Comments
 (0)