Review request for MACOSX_PORT-766: Create offscreen CALayer surface
Andrew Brygin
andrew.brygin at oracle.com
Thu Dec 15 01:51:36 PST 2011
Hi Dmitry,
I do not see anything obviously wrong here. Please address issues
which Artem have pointed out before push this change.
Thanks,
Andrew.
On 15.12.2011 13:37, Dmitry Cherepanov wrote:
> Here's the updated webrev
>
> http://cr.openjdk.java.net/~dcherepanov/macosx-port-766.1/
>
> Thanks,
> Dmitry
>
> Dmitry Cherepanov wrote:
>> Hi Sergey,
>>
>> Thanks for looking into this. Right, it's wrong that the method
>> returns null for zero size windows. The code has been modified to
>> return the instance of the NullSurfaceData class (with no-op
>> implementation) so that it prevents possible NPE exceptions.
>>
>> Sergey Bylokhov wrote:
>>> 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
>>>
>>>
>>
>>
>
More information about the macosx-port-dev
mailing list