On 04/12/2019 02:29, Sergey Bylokhov wrote:
On 12/2/19 2:45 am, Alexey Ivanov wrote:
We can have two different functions though:
ReleaseActiveDCs(HWND);
ReleasePassiveDCs();> Then we can drop the list parameter.
What do you think?

Yes, it is worth to try.

BTW it would be good to know do we really need passiveDCList, which
is populated on "WM_AWT_RELEASEDC" and immediately cleaned.

Yes, we still need passiveDCList. A DC can be moved to the passive list by DisposeThreadGraphicsInfo function in GDIWindowSurfaceData.cpp. This is called not on the toolkit thread, so we have to defer releasing the DC in this case.

However, I agree, we can simplify releasing DCs when on the toolkit thread by skipping the passive list. Yet having two different approaches could be error prone.

--
Regards,
Alexey

Reply via email to