WPF high-performance drawing - should I group by brush color?

In Direct2D, they recommend drawing similar things together to avoid unnecessary GPU state changes. They also perform some backstage drawing operations just for that.

I need to draw a lot of rectangles that can have one of two colors. I am going to make a drawing in two passes, one for rectangles with the first color, and the other for those with a different color.

Do you have any idea if the rendering speed will improve? The speed that I have now is not so great. I am drawing a DrawingContext derived from DrawingVisual.

+3
source share
1 answer

Source: https://habr.com/ru/post/1751373/


All Articles