How do you determine if WPF is using Hardware or Software Rendering?

前端 未结 7 1063
借酒劲吻你
借酒劲吻你 2020-11-27 16:06

I\'m benchmarking a WPF application on various platforms and I need an easy way to determine if WPF is using hardware or software rendering.

I seem to recall a cal

相关标签:
7条回答
  • 2020-11-27 16:30

    Based on the RenderingTier links, here is some code:

            logger.InfoFormat("WPF Tier = {0}",RenderCapability.Tier / 0x10000);
            RenderCapability.TierChanged +=
                (sender, args) => logger.InfoFormat("WPF Tier Changed to {0}",
                                                    RenderCapability.Tier / 0x10000);
    

    I'm still testing and working on this. See future edits/answers for what I find.

    0 讨论(0)
提交回复
热议问题