RFR: 8185862: AWT Assertion Failure in ::GetDIBits(hBMDC, hBM, 0, 1, 0, gpBitmapInfo, 0) 'awt_Win32GraphicsDevice.cpp', at line 185 [v4]
Christoph Langer
clanger at openjdk.org
Fri Feb 16 13:26:19 UTC 2024
- Previous message (by thread): RFR: 8185862: AWT Assertion Failure in ::GetDIBits(hBMDC, hBM, 0, 1, 0, gpBitmapInfo, 0) 'awt_Win32GraphicsDevice.cpp', at line 185 [v4]
- Next message (by thread): RFR: 8185862: AWT Assertion Failure in ::GetDIBits(hBMDC, hBM, 0, 1, 0, gpBitmapInfo, 0) 'awt_Win32GraphicsDevice.cpp', at line 185 [v5]
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
On Fri, 16 Feb 2024 11:40:15 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:
>> Christoph Langer has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Little cleanup
>
> src/java.desktop/windows/native/libawt/windows/Devices.cpp line 93:
>
>> 91: int g_nMonitorCounter;
>> 92: int g_nMonitorLimit;
>> 93: HMONITOR* g_hmpMonitors;
>
> These global variables — `g_nMonitorCounter`, `g_nMonitorLimit`, `g_hmpMonitors` — could be `static` as well.
>
> In fact, they can be encapsulated in the relevant functions which need them by using the last parameter of [`EnumDisplayMonitors`](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-enumdisplaymonitors). For `CountMonitors`, using `&nMonitorCounter` will be enough; for `CollectMonitors`, the three variables need to be encapsulated in a local structure the pointer to which is passed.
>
> However, it's likely not worth the effort… If it works, don't touch it.
Good suggestion, I created local variables and pass the data on to the callback functions.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17614#discussion_r1492444091
- Previous message (by thread): RFR: 8185862: AWT Assertion Failure in ::GetDIBits(hBMDC, hBM, 0, 1, 0, gpBitmapInfo, 0) 'awt_Win32GraphicsDevice.cpp', at line 185 [v4]
- Next message (by thread): RFR: 8185862: AWT Assertion Failure in ::GetDIBits(hBMDC, hBM, 0, 1, 0, gpBitmapInfo, 0) 'awt_Win32GraphicsDevice.cpp', at line 185 [v5]
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the client-libs-dev
mailing list