macOS: Disable explicit layerContentsPlacement

It was needed to allow lazy resize of the backingstore IOSurfaces, but
that feature hasn't been enabled yet, and explicitly setting the layer's
contents placement to NSViewLayerContentsPlacementTopLeft resulted in
the layer animating when the window was moved from screens of different
scale factors.

We need to investigate this further, but in the meantime fix the
visual regression by disabling the explicit layer contents placement.

Change-Id: I63ea1eab9cf3fa6480e88844918ed98e6aa72620
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
bb10
Tor Arne Vestbø 2019-03-26 15:33:51 +01:00
parent 163a0475eb
commit accf7ce024
1 changed files with 2 additions and 0 deletions

View File

@ -163,12 +163,14 @@
return NSViewLayerContentsRedrawDuringViewResize;
}
#if 0 // Disabled until we enable lazy backingstore resizing
- (NSViewLayerContentsPlacement)layerContentsPlacement
{
// Always place the layer at top left without any automatic scaling,
// so that we can re-use larger layers when resizing a window down.
return NSViewLayerContentsPlacementTopLeft;
}
#endif
- (void)updateMetalLayerDrawableSize:(CAMetalLayer *)layer
{