Adobe AIR for Android 中的GPU 渲染 [译]
2013-11-28 12:21
357 查看
最近我开始尝试Adobe AIR for Android 中的GPU 渲染,并且决定通过视频来展示CPU和GPU渲染模式之间的不同之处。
这个样例应用的代码位于Github:
正如你在样例应用中所见,将渲染任务分配给GPU,关键要做三件事情:
1. 在应用的描述符里设置GPU渲染模式,如下所示:
<initialWindow>
<content>[...]</content>
<resizable>true</resizable>
<autoOrients>false</autoOrients>
<fullScreen>false</fullScreen>
<visible>true</visible>
<renderMode>gpu</renderMode>
</initialWindow>
2. 确保DisplayObject中的cacheAsBitmap被设置为true,例如:
square.cacheAsBitmap = true;
3. 确保在DisplayObject里将一个Matrix对象分配给cacheAsBitmapMatrix属性:
square.cacheAsBitmapMatrix = new Matrix();
以上这些就是为了将渲染任务从CPU转移给GPU所有你需要做的。这样,你的CPU就可以被解放出来去做一些更重要的事情了。
相关文章推荐
- Adobe Native Extension(ANE)-Actionscript通过语音来控制你的android应用-Air for android
- AIR Native Extension for Android 接入第三方sdk 如何实现生命周期
- android player,wzplayer for android (gles2.0)渲染 ,声音支持AudioTrack,opensl es
- Adobe Flash Builder 4.5 Android Air 程序开发系列 之九 定位
- Android GPU加速渲染自定义View 性能改善<13>
- Adobe Flash Builder 4.5 Android Air 程序开发系列 之八 照相机
- 使用的BlackBerry® Tablet OS SDK for Adobe® AIR®开发应用(四)
- Developing native extensions for Adobe AIR
- GPUImageForAndroid
- Android开发者的Air For Android简单入门
- android player,wzplayer for android (gles2.0)渲染 ,声音支持AudioTrack,opensl es
- 开发AIR for android 大象游戏合集开发总结
- flex(air for android )操作menu
- 12 Best Adobe AIR Applications for Web Designers
- Local Caching of Remote Images in AIR for Android
- android player,wzplayer for android (gles2.0)渲染 ,声音支持AudioTrack,opensl es
- AIR 2.5 App for Android emulator Error
- 3D APIs for Adobe Flash Player and Adobe AIR
- adobe air for flex(利用blazeds连接远程java服务)
- Android 代码强制启动GPU渲染