Friday, 15 January 2010

c# - WPF Application - Rendering performances -


I am currently developing an application for Windows XP, 7 and 8. To test this app, I use two computers.

When hardware acceleration is enabled:

  • On the first computer: The application is very liquid
  • On another computer: The application is very slow
  • When hardware acceleration is disabled:

    • On the first computer: The application is slightly slowed
    • Second computer: The application is slightly slowed

    Therefore, I would like to disable hardware acceleration based on the computer on which the application has been launched. For this, I am currently using the following code:

      public partial class app: application {safe override zero startupErgs} {Base.OnStartup (E); // try to improve the display int renderingTier = (RenderCapability.Tier> gt;> 16); If (rendering tier & lt; 2) {render option. ProcessorRenderMode = RenderMode Software only; }}}  

    The problem is that both computers have RenderingTier = 2. This is the reason that I

     if (renderingTier <2) {RenderOptions.ProcessRenderMode = RenderMode.SoftwareOnly; } << Code>  

    By

      if (renderingTier & lt; 2 || some)) {RenderOptions.ProcessRenderMode = RenderMode.SoftwareOnly; }  

    Can you help me find some "function"? Thank you.

Instead of hardcoding it, why not let the user decide whether to use hardware or software Rendering? Simply include a setting in your application that the user can toggle.

It simplifies your work, and, most importantly, you do not have to work hard to get your criteria to choose one or the other.

Apart from that: It can also find out that why is rendering its performance slow, and see if you can improve it, .


No comments:

Post a Comment