Repaint performance issue on iOS (iPad3)

Hi,

I have a performance problem on iPad3 with the user interface refresh (but also if I do not use only one image, only FilledRectangle and so on...)

I just like to paint a component with repaint(0,0,width,height) methode of the component and every time the parents/owner paint(Graphics&) methode will be also called and paint all the other stuff.

Is there a way to just call the paint methode of the component in iOS?

Or do I something wrong?

Thanks.

The only idea that I have to solve that problem is to split the interface in smaller parts with child components and control manually if a paint is required or not. But this is a lot of work.

What is your opinion? Is there a easyer way?

have you tried setOpaque(true) on your child component ?

Unless your component is opaque, you need to repaint your parent as well for transparency to work. This is the default in Juce.

Thanks.

Yes, I've tried setOpaque(true). But looks very ugly.

If also setBufferedToImage(true) setted, the components looks like the top view on the attached picture. If only setOpaque(true) is setted it looks like the bottom on the pic.

It's only "ugly" because you're not using it appropriately. Read the docs for setOpaque!

Ok, now I understand the opaque thing.

My solution to only repaint slider and the slider bg (a little bit crazy but it works):

class SliderWrapper : public Component
{
protected:
  Slider* slider;

  SliderWrapper()
  {
    setOpaque(true);
    // init slider and other stuff
  }

private:
  void paint( Graphics& g ) override
  {
    // paint only the bg for the size of the slider
  }

  // other wrapper stuff
}

Is there a more easy solution?

Thanks.

Or just make sure you set an opaque colour for Slider::backgroundColourId?

Good idea but does not work. Looks like the black version at the pictures.