注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

分享,态度 ·~~

—— 十年太长,五年;如果可以回到五年前,你最想对那时候的自己说什么?

 
 
 

日志

 
 

The Render thread  

2010-07-15 11:23:45|  分类: DotNet |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

Time to stop talking about hwnd interop for a few moments and get back to some earlier questions.  Lee asked what the mysterious renderer thread does.  Good topic, and I happened to have some previously written material lying around on just that question.  <g>

Avalon apps have one or more UI threads, which run message loops, aka Dispatcher.Run().  And there's also the render thread, which is one per avalon process and should be completely hidden to the application author.  The render thread is the one that actually talks to DirectX, the UI thread sends it a series of detailed instructions on what to draw, via what we call the "channel" interface.  But the render thread doesn't really know when to draw (because that notification comes in via the message loop).  Interestingly, the actual Brush and Visual objects never leave the UI thread -- the render thread doesn't understand such complicated things.

So why did we put this on a separate thread at all?  Well, a couple reasons.  First, because the interface between the UI thread and render thread is also used for terminal services, which remotes things between machines.  Essentially, the render thread runs on your local machine (mstsc.exe), and the UI thread runs on the server.  This separation also enables some really powerful things that will be coming in the future (not sure whether that's this version or the next) -- we hope to make it so the render thread can act more independently of the UI thread -- e.g., some animations (the so-called "independent animations") don't need any information from the UI thread, they could be done completely on the render thread and at a higher frame rate.  Finally, although currently the application talks to the Longhorn Desktop Window Manager (DWM) via what is essentially a bitmap, in the future we may use the channel interface which enables a few new optimizations and rendering possibilities

【from nkramer http://blogs.msdn.com/b/nickkramer/archive/2005/07/19/437025.aspx

  评论这张
 
阅读(790)| 评论(5)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017