Review request for MACOSX_PORT-766: Create offscreen CALayer surface
Sergey Bylokhov
sergey.bylokhov at oracle.com
Tue Dec 13 13:28:13 PST 2011
Hi Dmitry,
I have a question about this code(CGLLayer.java)
81 public SurfaceData replaceSurfaceData() {
82 if (peer.getBounds().isEmpty()) {
83 return surfaceData;
84 }
It can return null for peers which have empty bounds. In this case we
cannot create correct Graphics object in getGraphics()(see
LWComponentPeer.getOnscreenGraphics()).
I think it is incorrect, we should have correct Graphics for such peers.
12.12.2011 21:41, Dmitry Cherepanov wrote:
> Hi Mike, Phil,
>
> Here's a fix for the following task -
> http://java.net/jira/browse/MACOSX_PORT-766
>
> The purpose of the fix is to create purely off-screen CALayer surface
> that isn't tied to an NSView or NSWindow (needs to be done before
> proceeding with MACOSX_PORT-539).
>
> Webrev - http://cr.openjdk.java.net/~dcherepanov/macosx-port-766.0/
>
> Some brief notes regarding the changes:
>
> - the fix disables the initial implementation for the CALayer-based
> rendering (pushed as a part of
> http://java.net/jira/browse/MACOSX_PORT-77) as this implementation
> tries to reuse the existing CGLWindowSurfaceData class (to implement
> intermediate buffer) and it automatically becomes tied to a
> NSView/NSWindow.
>
> - the new approach introduces new CGLLayerSurfaceData class - this
> type of surface serves as an intermediate buffer between the flusher
> thread and the AppKit thread. And the new CGLLayerSurfaceData class
> allows us to have the implementation of the CGLLayer class independent
> from the CGLWindowSurfaceData class.
>
> Could you please take a look at this? Thanks in advance for any review.
>
> Thanks,
> Dmitry
--
Best regards, Sergey.
More information about the macosx-port-dev
mailing list