Graphical Flicker when moving slider


#1

We have a multitouch mxing console application and we're getting many complaints from users about "flicker" while moving the faders (Juce::Slider). It seems to be centered around the Yosemite update, although we had had various complaints on previous versions of OSX, so the update might not be the exact culprit. Also, testing on our machines locally, we're not able to reproduce the issue despite the fact that the system specs (graphics card, etc.) are nearly identical to some of the users reporting the problem.

Has anyone seen a similar sort of graphical flicker where an entire component turns transparent for a split second during a repaint?

Here's a screenshot and a gif showing the problem: 

  

http://gyazo.com/a0a66da6473ddf39e3d99db8ff8a91fa

 


#2

Seems related to or idential to the issues reported here: 

http://www.juce.com/forum/topic/repainting-glitches-mac-os-1010#comment-310588


#3

Very peculiar.. I've never seen anything like that in any of my apps.

The only thing that I can imagine could be the cause would be if your paint() method occasionally blocks for a long time in the middle of doing its drawing. The OSX paint manager will only wait for a certain amount of time for your drawing routine to finish before it flushes to the screen whatever has been drawn up to that point, and then when your paint routine carries on, the finished image will be drawn correctly.


#4

It happens to me when I add a Component to the desktop. It does not happen if this component is a DocumentWindow.

This seems to be an important issue here. We need a solution.


#5

We'd need some code that reliably reproduces the problem if you want us to look at it, we've not seen the same thing here.

But do read my reply above - if it's just OSX not waiting for a slow paint method then it's a performance problem for your app and not something we can magically fix.


#6

I am experiencing the same issue as OP. I know probably I need to optimize the paint method :wink: but I want to know more about how macOS handles the graphics - could you please point me to some docs describing what you’ve mentioned? What should I google for? Thanks in advance :slight_smile:


#7

If your paint method is so slow that it’s glitching then you just need to profile it, find out where the bottleneck is, and do some optimisation.

I don’t think you’re likely to find any ready-made docs out there describing your exact situation, you need to get measuring and debugging.