diff --git a/src/macosx/native/sun/awt/AWTSurfaceLayers.m b/src/macosx/native/sun/awt/AWTSurfaceLayers.m index 6e9fbbca5abaa50e54a4955906326b33cc6a26bd..d12908c83a3ce7dcfb3fc8eff5707d342fc705b1 100644 --- a/src/macosx/native/sun/awt/AWTSurfaceLayers.m +++ b/src/macosx/native/sun/awt/AWTSurfaceLayers.m @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,6 +28,7 @@ #import "LWCToolkit.h" #import +#import @implementation AWTSurfaceLayers @@ -74,14 +75,12 @@ } - (void) setBounds:(CGRect)rect { - layer.anchorPoint = CGPointMake(0, 0); - // translates values to the coordinate system of the "root" layer - CGFloat newY = windowLayer.bounds.size.height - rect.origin.y - rect.size.height; - CGRect newRect = CGRectMake(rect.origin.x, newY, rect.size.width, rect.size.height); - - layer.frame = newRect; - + rect.origin.y = windowLayer.bounds.size.height - rect.origin.y - rect.size.height; + [CATransaction begin]; + [CATransaction setDisableActions:YES]; + layer.frame = rect; + [CATransaction commit]; [AWTSurfaceLayers repaintLayersRecursively:layer]; } diff --git a/src/macosx/native/sun/java2d/opengl/CGLLayer.m b/src/macosx/native/sun/java2d/opengl/CGLLayer.m index e0074eb4ef3d68355c75dbdd2632087fca11b53c..f300ea404c462266d2f11cff06d619b0f1e1e709 100644 --- a/src/macosx/native/sun/java2d/opengl/CGLLayer.m +++ b/src/macosx/native/sun/java2d/opengl/CGLLayer.m @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -64,11 +64,13 @@ AWT_ASSERT_APPKIT_THREAD; //Disable CALayer's default animation NSMutableDictionary * actions = [[NSMutableDictionary alloc] initWithObjectsAndKeys: + [NSNull null], @"anchorPoint", [NSNull null], @"bounds", [NSNull null], @"contents", [NSNull null], @"contentsScale", [NSNull null], @"onOrderIn", [NSNull null], @"onOrderOut", + [NSNull null], @"position", [NSNull null], @"sublayers", nil]; self.actions = actions;