On Thu, 28 Oct 2021 08:24:46 GMT, Masanori Yano <my...@openjdk.org> wrote:

>> src/java.desktop/windows/classes/sun/java2d/d3d/D3DScreenUpdateManager.java 
>> line 455:
>> 
>>> 453:                             rq.unlock();
>>> 454:                         }
>>> 455:                     } else if (!validate(sd, true)) {
>> 
>> The comment below says that "the surface will also trigger a repaint", will 
>> it be possible we will trigger it inside validate here and then later inside 
>> "replaceSurfaceDataLater"?
>
> Yes, this run() is called on "D3D Screen Updater" thread. It is reasonable 
> that a new PaintEvent is posted when SurfaceData is replaced on this thread. 
> I would limit posting new PaintEvent via createGraphics() only.

Probably I should clarify my question, you added a parameter to the validate 
method and pass the "true" so the "validate" method will post a paint event, 
but just a few lines below there is a comment that the next code line 
"sd.getPeer().replaceSurfaceDataLater();" also will post an event. Is the 
comment outdated, or we will post two of them?

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

PR: https://git.openjdk.java.net/jdk/pull/6064

Reply via email to