Richard, Steve and I were discussing the fact that we have seen there is a big cost every-time we change OpenGL state to change to new shader as we also have to flush the buffers. Typically when we render UI controls its all rounded rectangles and text. So almost every draw call we are switching from one to the other. Steve found that in simple tests there might be a 5x or more gain if we could render all the rectangles first then all the text after. We have investigated state sorting before and not found a easy way to apply to 2D graphics with lots of transparency(due to antialiasing). We then thought hand on a minute, with Region caching all region drawing after the first time should just be simple texture draws. Also all text is in a glyth cache so again that should be all texture calls. So in theory once we have drawn all regions to cache we should only be doing texture draws.
To test this out we need to investigate is it possible to draw text and region cache textures using the same shaders and setup and avoiding the state switching and flushes.
Secondly we will need to see how many Region cache misses we get with typical applications and look at extending the range of cases that get cached if this proves to offer big performance gains.
To test this out we need to investigate is it possible to draw text and region cache textures using the same shaders and setup and avoiding the state switching and flushes.
Secondly we will need to see how many Region cache misses we get with typical applications and look at extending the range of cases that get cached if this proves to offer big performance gains.
- blocks
-
JDK-8090757 Improve JavaFX embedded performance
- Open
- relates to
-
JDK-8091948 Optimize startup of controls app (Mostly for embedded)
- Open