开发者

WPF Effects vs Geometry performance

I'm rendering a some开发者_StackOverflow中文版what complex (200+ DrawingVisuals) 2D map using WPF, and I'm doing some restructuring of my rendering setup. Before I go and spend a lot of time building a system, maybe someone has experience here.

I have the option of creating 3-4 copies of each DrawingVisual for each visible state, for example, a DV for Selected, Hovered, or Normal. My question is, would it be more performant to just have a single DV and simply apply a shader Effect to it, rather than swapping out the whole drawing visual from the rendering hierarchy.

I don't know the performance cost of Effects vs just using a lot of pre-drawn Geometries and DrawingVisuals.

Anyone?


I have found Drawings being Freezable and Animatable perform better. To make them have selected, hovering or normal effects use their clones (Freezable.Clone()) to add your effects around them... I think that should perform better.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜