RFR: 8185862: AWT Assertion Failure in ::GetDIBits(hBMDC, hBM, 0, 1, 0, gpBitmapInfo, 0) 'awt_Win32GraphicsDevice.cpp', at line 185 [v2]

Christoph Langer clanger at openjdk.org
Thu Mar 7 16:48:02 UTC 2024


On Thu, 7 Mar 2024 00:47:00 GMT, Phil Race <prr at openjdk.org> wrote:

>> It is not what I meant… If we want to preserve the way it work, we should execute the below code even if `this->GetDC()` fails…
>> 
>> On the other hand, testing didn't find any problems, in which case I prefer bailing out after `::GetDIBits` fails too.
>> 
>> @prrace, Do you know how critical the code below is? Is it worth to code the fallback if the path to `::GetDIBits`?
>
>> @prrace, Do you know how critical the code below is? Is it worth to code the fallback if the path to ::GetDIBits?
> 
> In the headLESS case we should never be here, since this is initializing the devices that don't exist in that case.
> In the headFUL case I would prefer to keep the existing non-debug behaviour that we soldier on and try to do something sensible. Line 204 has a comment about a case in which GetDIBits really did fail and there's code to cope. I am writing specifically about GetDIBits.

OK, I have reverted all changes to awt_Win32GraphicsDevice.cpp since we don't go through the code in the new headless case any more. I guess it's best to leave any refactoring of this code to later efforts.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/17614#discussion_r1516492296


More information about the client-libs-dev mailing list