[OpenJDK 2D-Dev] [14] RFR JDK-8235147: Release HDC from passiveDCList sooner
Jayathirth D v
JAYATHIRTH.D.V at ORACLE.COM
Mon Feb 24 15:22:41 UTC 2020
Hi Alexey,
Change looks good to me.
I think this change should be in awt-dev, so I have added the same for future reference.
Thanks,
Jay
> On 24-Feb-2020, at 7:15 PM, Alexey Ivanov <alexey.ivanov at oracle.com> wrote:
>
> I'm still waiting for a second reviewer.
>
> Anyone?
> Thank you in advance!
>
>
> On 17/02/2020 12:56, Alexey Ivanov wrote:
>> Thank you, Sergey, for your review!
>>
>> Any other volunteers?
>>
>>
>> On 06/02/2020 23:10, Sergey Bylokhov wrote:
>>> Looks fine.
>>>
>>> On 2/6/20 1:39 pm, Alexey Ivanov wrote:
>>>> Hello once again,
>>>>
>>>> After trying a few things suggested by Sergey, I found serious issues in the new approaches although the code looked a bit cleaner. Resolving those issues requires substantial changes to the way we handle the active and passive DC lists.
>>>>
>>>> Thus, it's safer to postpone further refactoring to a later time.
>>>>
>>>> So we're back to the original proposal.
>>>>
>>>> I'm quoting it for your convenience below:
>>>>
>>>> JBS: https://bugs.openjdk.java.net/browse/JDK-8235147
>>>> Webrev: http://cr.openjdk.java.net/~aivanov/8235147/webrev.00/
>>>>
>>>>
>>>> When a DC becomes unused, it is moved from activeDCList to passiveDCList to be released later. It will stay in the passiveDCList until a new DC is requested for the same window or the window is destroyed.
>>>>
>>>> The DCs in passiveDCList will never be used again, so we can release them as soon as another request for a DC comes in.
>>>>
>>>> The test case, ManyFramesTest.java, attached to the bug creates and displays 10 frames. Then it hides the 9 frames. At this point, passiveDCList contains 9 entries. These DCs will not be released until the corresponding frame is shown and painted again or the frame is destroyed.
>>>>
>>>>
>>>> The fix releases all DCs currently in passiveDCList when another DC is requested.
>>>> With the fix, when running ManyFramesTest.java test case, the number of entries in passiveDCList does not grow, the list contains at most 1 entry.
> --
> Regards,
> Alexey
More information about the 2d-dev
mailing list