Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ownership estimate overlay is flickery #569

Closed
gjm11 opened this issue Jul 12, 2019 · 0 comments
Closed

Ownership estimate overlay is flickery #569

gjm11 opened this issue Jul 12, 2019 · 0 comments

Comments

@gjm11
Copy link
Contributor

gjm11 commented Jul 12, 2019

I'm using Lizzie with KataGo and find that the ownership estimate display is flickery; sometimes it briefly disappears altogether, sometimes it briefly displays in a distorted way.

I believe this is because BoardRenderer.drawEstimateRectKata is operating directly on the same BufferedImage that's used in actual rendering, and if BoardRenderer.draw happens to be called while it's being updated then bad things can happen. (Some or all of the ownership-indicators will be missing, and I guess the unsightly corrupted versions I see sometimes occur when draw is called while fillRect is doing its thing.) The flickering goes away completely if I make drawEstimateRectKata do this:

BufferedImage newEstimateImage = new BufferedImage(boardWidth, boardHeight, TYPE_INT_ARGB);
Graphics2D g = newEstimateImage.createGraphics();

// (actual code to recreate the image is here, same as before)

cachedEsitmateRectImage = newEstimateImage;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant