On Thu, 7 Mar 2024 00:47:00 GMT, Phil Race <p...@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

Reply via email to