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 能做什么
的:
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 能做什么
相关文章推荐
- Silverlight for Windows Phone Toolkit升级 新增四个控件 推荐
- Silverlight for Windows Phone 7开发系列(3):多媒体开发
- 一周学会Silverlight for Windows Phone(更新程度:完毕)
- 【译】Silverlight for Windows Phone Toolkit In Depth(六)
- Silverlight for Windows Phone 7开发系列(4):动画开发
- [Winodows Phone 7控件详解]Silverlight toolkit for Windows Phone 7.1控件-6
- [Winodows Phone 7控件详解]Silverlight toolkit for Windows Phone 7.1控件-8
- Silverlight for Windows Phone 7开发系列(1):环境搭建
- Silverlight for Windows Phone Toolkit升级 新增四个控件
- Silverlight for Windows phone之初体验
- Silverlight for Windows Phone 7开发系列(4):动画开发
- 一周学会Silverlight for Windows Phone(更新程度:完毕)
- 林永坚(Jake Lin)的Silverlight for Windows Phone 7开发系列文章 – From zero to hero
- 【转】Silverlight for Windows Phone 7开发系列(1):环境搭建
- Silverlight for Windows Phone Toolkit
- Silverlight for Windows Phone开发系列课程
- Silverlight for Windows Phone 7开发系列(1):环境搭建
- Silverlight for Windows Phone Toolkit升级 新增四个控件
- Silverlight for Windows phone之初体验
- Silverlight for Windows Phone 7开发体验