【问题标题】:how to enable hardware acceleration in windows phone?如何在windows phone 中启用硬件加速?
【发布时间】:2013-09-15 07:30:38
【问题描述】:

我创建了一个简单的游戏应用程序,就像你在android设备上找到的Flow Connect,但是在绘制线条时似乎有点慢,所以我想启用GPU或启用硬件加速,以便应用程序在windows中快速执行phone,应该在哪里进行硬件加速,在 XAML 文件中或其他地方。

【问题讨论】:

  • 硬件加速是自动的。从那里开始,就是知道如何从中受益的问题。查看有关“合成器线程”的文章以了解其工作原理。但是切入正题,为了有效地使用硬件加速,您需要在为元素设置动画时使用故事板和渲染转换。

标签: c# silverlight xaml windows-phone-7


【解决方案1】:

这是代码

试试看

    1. Enable composition caching at the plug-in level by setting the EnableGPUAcceleration parameter to “true”.

<param name="EnableGPUAcceleration" value="true" />

2. You can now enable GPU acceleration on the element(s) you wish to cache by specifying a CacheMode value of BitmapCache on the object or container of objects.

<StackPanel   CacheMode="BitmapCache" … />

这是一个关于 windows phone 和 silverlight 中 gpu 加速的博客

hardware acceleration windows phone and silverlight

【讨论】:

  • 适用于 html 级别的 silverlight,不适用于 windows phone。在 windows phone 上,您实际上可以看到这个名为 Application.Current.Host.Settings.EnableGPUAcceleration 的参数的合理值,这实际上始终是正确的。
  • 这有帮助吗
  • 这应该有帮助,但仅适用于不需要不断重新渲染内容的 UIElement(像几何图形这样的静态内容)以及像 @Kookiz 所说的那样与 Storyboard 和 RenderTransform 结合使用
  • 你可以使用 Application.Current.Host.Settings.EnableCacheVisualization = true;检查什么是硬件加速,什么不是
  • 但是我找到的链接说它适用于silverlight和windows phone。按照常识,我知道在 windows phone 中可能没有这样的极端功能,但是。由于没有设备无法通过。感谢您提供此信息:)
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2021-11-07
  • 1970-01-01
  • 2015-03-15
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多