您的位置:首页 > 其它

Silverlight - Silverlight for Windows Phone中的Render 线程

2010-06-13 16:40 423 查看
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 能做什么
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: