--- old/src/macosx/native/sun/java2d/opengl/CGLLayer.m 2012-10-23 16:29:07.968712900 +0400 +++ new/src/macosx/native/sun/java2d/opengl/CGLLayer.m 2012-10-23 16:29:07.765912600 +0400 @@ -57,9 +57,10 @@ // NOTE: async=YES means that the layer is re-cached periodically self.asynchronous = FALSE; - self.autoresizingMask = kCALayerWidthSizable | kCALayerHeightSizable; self.contentsGravity = kCAGravityTopLeft; - self.needsDisplayOnBoundsChange = YES; + //Layer backed view + //self.needsDisplayOnBoundsChange = YES; + //self.autoresizingMask = kCALayerWidthSizable | kCALayerHeightSizable; textureID = 0; // texture will be created by rendering pipe target = 0; @@ -109,6 +110,10 @@ glDisable(target); } +-(BOOL)canDrawInCGLContext:(CGLContextObj)glContext pixelFormat:(CGLPixelFormatObj)pixelFormat forLayerTime:(CFTimeInterval)timeInterval displayTime:(const CVTimeStamp *)timeStamp{ + return textureID == 0 ? NO : YES; +} + -(void)drawInCGLContext:(CGLContextObj)glContext pixelFormat:(CGLPixelFormatObj)pixelFormat forLayerTime:(CFTimeInterval)timeInterval displayTime:(const CVTimeStamp *)timeStamp { AWT_ASSERT_APPKIT_THREAD;