src/macosx/native/sun/java2d/opengl/CGLLayer.m
Print this page
*** 55,67 ****
self.javaLayer = layer;
// NOTE: async=YES means that the layer is re-cached periodically
self.asynchronous = FALSE;
- self.autoresizingMask = kCALayerWidthSizable | kCALayerHeightSizable;
self.contentsGravity = kCAGravityTopLeft;
! self.needsDisplayOnBoundsChange = YES;
textureID = 0; // texture will be created by rendering pipe
target = 0;
return self;
}
--- 55,68 ----
self.javaLayer = layer;
// NOTE: async=YES means that the layer is re-cached periodically
self.asynchronous = FALSE;
self.contentsGravity = kCAGravityTopLeft;
! //Layer backed view
! //self.needsDisplayOnBoundsChange = YES;
! //self.autoresizingMask = kCALayerWidthSizable | kCALayerHeightSizable;
textureID = 0; // texture will be created by rendering pipe
target = 0;
return self;
}
*** 107,116 ****
--- 108,121 ----
glBindTexture(target, 0);
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;
// Set the current context to the one given to us.