SILVERLIGHT-GPU acceleration

Source: Internet
Author: User
Tags silverlight

1. Set <param name= "Enablegpuacceleration" value= "true" on the Silverlight plug-in/> 或使用代码 Application.Current.Host.Settings. enablegpuacceleration = True;

2. CacheMode = set "BitmapCache" - 所谓GPU加速是基于GPU缓存了一些UI元素,节省了CPU的耗用 on a control of type UIElement

How do I know which controls are cached? Set on the Silverlight < param name plug-in = "enableCacheVisualization" value = "true" /> 后程序界面中会有颜色变化:

1. Red means not being cached

2. Normal color indication is cached

3. Green indicates no setting CacheMode = "BitmapCache",但被自动缓存

Because the principle of GPU acceleration is caching, the frequent change of the UIElement is not appropriate, because the frequent update of the cache will result in performance loss. But mideaelement such as video uses GPU acceleration to achieve performance improvements:

Figure: Caching-enabled video

However, the Perspetive 3d effect video is not available:

Figure: The video on the right uses the Pespective 3d effect, which is shown in red with no cache

Limitations of GPU Acceleration:

1. GPU acceleration supports only the following animations: Scale , Rotate, changing Opacity, Clipping (only if clip is rectangular), others not supported, such as Perspect Ive animated 3d effects.

2. With insufficient GPU memory, Silverlight will use the CPU to implement the cache by default, which will increase the burden on the CPU-currently Silverlight does not support the method of querying the GPU cache size, only the Analytics.gpucollection property is provided.

3. Need to support DirectX (Windows) or OpenGL (MAC) graphics, and only full-screen mode is supported on MAC

Transferred from: http://blog.csdn.net/jameszhou/article/category/543888

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.