8263488: Verify CWarningWindow works with metal rendering pipeline

Reviewed-by: serb, pbansal, avu, kizune
This commit is contained in:
Ajit Ghaisas 2021-03-22 02:44:59 +00:00
parent 5a7f22ab94
commit 42104e5575

View File

@ -92,8 +92,10 @@ public class MTLLayer extends CFRetainedResource {
MTLGraphicsConfig gc = (MTLGraphicsConfig)getGraphicsConfiguration();
surfaceData = gc.createSurfaceData(this);
setScale(gc.getDevice().getScaleFactor());
Insets insets = peer.getInsets();
execute(ptr -> nativeSetInsets(ptr, insets.top, insets.left));
if (peer != null) {
Insets insets = peer.getInsets();
execute(ptr -> nativeSetInsets(ptr, insets.top, insets.left));
}
// the layer holds a reference to the buffer, which in
// turn has a reference back to this layer
if (surfaceData instanceof MTLSurfaceData) {