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 - Silverlight for Windows Phone中的Render 线程
图:Silverlight for Windows Phone 中的render thread 能做什么


你可能感兴趣的:(thread,windows,windows,silverlight,WPF,phone)