Request for review: 7124552 [macosx] NullPointerException in getBufferStrategy()
Alexander Potochkin
Alexander.Potochkin at oracle.com
Wed Feb 15 05:54:55 PST 2012
Hello Andrew
> The change looks fine to me.
>
> Alex, please note that there we just have to flush current buffer content
> from the image buffer to a surface related to canvas.
>
> The buffer strategy machinery is responsible to verify that the buffer
> state is valid before flip.
Thanks for the comments
I am fine with the fix
alexp
>
> Thanks,
> Andrew
>
> On 2/15/12 4:38 PM, Sergey Bylokhov wrote:
>> 15.02.2012 16:28, Alexander Potochkin пишет:
>>> Hello Sergey
>>>> 15.02.2012 15:39, Alexander Potochkin wrote:
>>>>> Hello Sergey
>>>>>
>>>>> LWCanvasPeer.flip()
>>>>>
>>>>> I don't think you can work withVolatileImage as with an ordinary
>>>>> Image,
>>>>> you take a buffer and then draw it to the graphics
>>>>> when the buffer may be already expired.
>>>>>
>>>>> look at RepaintManager.PaintManager.paint()
>>>>>
>>>>> it tries to repaint the image if its content is lost,
>>>>> after the fixed amount of attempts it falls back to the BufferedImage
>>>> Buffer strategy has its own contentLost()(see
>>>> FlipBufferStrategy.contentLost()) method which should be used by
>>>> the user.
>>>
>>> Could you give me a test case which uses this strategy?
>> test.sun.java2d.DirectX.RenderingToCachedGraphicsTest.RenderingToCachedGraphicsTest.java
>>
>>>
>>> Thanks
>>> alexp
>>>
>>>>>
>>>>> Here is a good blog about using VolatileImage
>>>>> http://weblogs.java.net/blog/chet/archive/2003/09/volatileimage_n.html
>>>>>
>>>>>
>>>>> LWWindowPeer - it would be better to move the comment to the
>>>>> method's javadoc
>>>>>
>>>>> Thanks
>>>>> alexp
>>>>>
>>>>>> Hi Everyone,
>>>>>> This is the first implementation for canvas backbuffer. npe was
>>>>>> eliminated.
>>>>>>
>>>>>> Bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7124552
>>>>>> Webrev can be found at:
>>>>>> http://cr.openjdk.java.net/~serb/7124552/webrev.00/
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>
>>
>
More information about the macosx-port-dev
mailing list