-
Notifications
You must be signed in to change notification settings - Fork 6k
[ios] Set contentsScale before we commit CATransaction #8218
Conversation
@@ -23,6 +23,7 @@ | |||
- (instancetype)initWithCoder:(NSCoder*)aDecoder NS_UNAVAILABLE; | |||
|
|||
- (instancetype)init NS_DESIGNATED_INITIALIZER; | |||
- (instancetype)initForGLWithContentsScale:(CGFloat)contentsScale; |
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.
Just say initWithContentsScale
and check the layer class in the implementation before setting the content and rasterization scales.
return self; | ||
} | ||
|
||
- (void)layoutSubviews { |
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 do I still need to override this method?
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 guess not
@@ -286,6 +287,7 @@ | |||
std::unique_ptr<Surface> surface = ios_surface->CreateSecondaryGPUSurface(gr_context); | |||
overlays_[overlay_id] = std::make_unique<FlutterPlatformViewLayer>( | |||
fml::scoped_nsobject<UIView>(overlay_view), std::move(ios_surface), std::move(surface)); | |||
overlays_gr_context_ = gr_context; |
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.
mention this in the PR description
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
flutter/engine@96ad0c8...a1dcb2e git log 96ad0c8..a1dcb2e --no-merges --oneline a1dcb2e [ios] Set contentsScale before we commit CATransaction (flutter/engine#8218) fa1931f Send macOS keyboard data to the engine (flutter/engine#8219) 45f69ac Plumb a reference of PlatformViewsController and AccessibilityBridge to each other (flutter/engine#8208) 7cbbdb4 libtxt: more accurate tracking of run positioning and width for justified text (flutter/engine#8214) 1728103 Add a build dependencies script for Linux desktop (flutter/engine#8160) d764b69 Add docs for helpful commands to fix format (flutter/engine#8171) The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff ([email protected]), and stop the roller if necessary.
flutter/engine@96ad0c8...6a8a45f git log 96ad0c8..6a8a45f --no-merges --oneline 6a8a45f Have the AccessibilityBridge attach/detach itself to the (flutter/engine#8229) 45b19e4 Roll src/third_party/skia ba91f65f2070..7e2c0614a2fd (13 commits) (flutter/engine#8228) 1dbd204 Moved io.flutter.embedding.engine.android package to io.flutter.embedding.android (flutter/engine#8221) bb35436 Roll src/third_party/dart 70e3e67dd7..5e9df35a57 (45 commits) 3b19a4d Removed dart_plugin_tag from DEPS d9b6629 Roll src/third_party/skia 4273a150f84d..ba91f65f2070 (6 commits) (flutter/engine#8225) e88573a Roll src/third_party/skia d7d93001ead2..4273a150f84d (1 commits) (flutter/engine#8224) be9067c Roll src/third_party/skia 37a9294d2eb9..d7d93001ead2 (2 commits) (flutter/engine#8223) ee4abba Roll src/third_party/skia 2894d13a0d9b..37a9294d2eb9 (1 commits) (flutter/engine#8222) 3496156 Roll src/third_party/skia dd0544078d05..2894d13a0d9b (33 commits) (flutter/engine#8220) a1dcb2e [ios] Set contentsScale before we commit CATransaction (flutter/engine#8218) fa1931f Send macOS keyboard data to the engine (flutter/engine#8219) 45f69ac Plumb a reference of PlatformViewsController and AccessibilityBridge to each other (flutter/engine#8208) 7cbbdb4 libtxt: more accurate tracking of run positioning and width for justified text (flutter/engine#8214) 1728103 Add a build dependencies script for Linux desktop (flutter/engine#8160) d764b69 Add docs for helpful commands to fix format (flutter/engine#8171) The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff ([email protected]), and stop the roller if necessary.
Layout occurs after [CATransaction commit]. layoutSubviews was where we set the contentsScale on the CALayer. This meant that for one frame, we would see content on the overlay view which was did not have the correct content scale. This change makes it so that we initialize the FlutterOverlayView with the correct contentsScale. This also updates the overlay_gr_context_ when we first create the overlay_view. This is an artifact of flutter#8175. This manifests as jank as seen in: flutter/flutter#29573
Layout occurs after
[CATransaction commit]
.layoutSubviews
was where we set thecontentsScale
on theCALayer
. This meant that for one frame, we would see content on the overlay view which was did not have the correct content scale.This change makes it so that we initialize the
FlutterOverlayView
with the correctcontentsScale
.This also updates the
overlay_gr_context_
when we first create theoverlay_view
. This is an artifact of #8175.This manifests as jank as seen in: flutter/flutter#29573