微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Silverlight - Silverlight for Windows Phone中的Render 线程

Silverlight for Desktop中没有单独的render thread,跟界面相关的操作都运行在一个UI thread中。之所以不像WPF那样设计一个单独的render thread,Ashraf Michail是这样解释 的:

 

Since WPF provides a rendering thread,it is probably surprising that Silverlight does not. You may be interested to kNow why.

The decision came down to a tradeoff between system overhead and decoupling framerates . With Silverlight,we went with a lighter weight on-thread approach and did not isolate your application code from the rendering system. That means you can do more in your animation (like have layout-based animation or custom code running) and there is minimal latency and overhead getting to the rendering system. The down side is if you do too much,you can interfere with operations such as video playback.
That said,the Silverlight rendering system will take advantage of multi-core processing and use many threads to speed up rendering for it. So,rendering is rarely "on thread," (感觉是笔误,应为 "one thread") but it is synchronized with your app to avoid synchronization plus copies of data.

当然Silverlight for Desktop中并不是所有的系统代码都在一个UI thread中,还有一些 子线程用来处理rame rasterization,media decoding and GPU marshalling等操作

Silverlight for Windows Phone却设计了一个单独的render thread,Seema Ramchandani的Siverlight Performance on the Windows Phone 的演示中提到:

图:Silverlight for Windows Phone 中的render thread 能做什么

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐