EAGLLayer.opaque 设置为 YES
2012-11-13 16:32
253 查看
By default, CALayers are set to non-opaque (i.e.
transparent). However, this is bad for performance reasons (especially with OpenGL), so it’s best to set this as opaque when possible.
Improving Compositing Performance in Core Animation
The contents of renderbuffers are animated and composited along with any other Core Animation layers inyour view hierarchy, regardless of whether those layers were drawn with OpenGL
ES, Quartz or other graphicslibraries. That’s helpful, because it means that OpenGL ES is a first-‐class citizen to Core Animation. However,mixing OpenGL ES content with other content takes time; when used improperly, your application may performtoo slowly
to reach interactive frame rates. The performance penalties for mixing and matching content varydepending on the underlying graphics hardware on the iOS device; devices that use the PowerVR MBX graphicsprocessor incur more severe penalties when compositing
complex scenes. For best results, alway test yourapplication on all iOS devices you intend it to ship on.
For the absolute best performance, your application should rely solely on OpenGL ES to render your content.To do this, size the view that holds your
CAEAGLLayer
object to match the screen, set its
opaque
propertyto
YES,
and ensure that no other Core Animation layers or views are visible. If your OpenGL ES layer is compositedon top of other layers, making your
CAEAGLLayer
object opaque reduces but doesn’t eliminate the performancecost.
If your
CAEAGLLayer
object is blended on top of layers underneath it in the layer hierarchy, the renderbuffer’scolor data must be in a premultiplied alpha format to be composited correctly by
Core Animation. BlendingOpenGL ES content on top of other content has a severe performance penalty.
transparent). However, this is bad for performance reasons (especially with OpenGL), so it’s best to set this as opaque when possible.
Improving Compositing Performance in Core Animation
The contents of renderbuffers are animated and composited along with any other Core Animation layers inyour view hierarchy, regardless of whether those layers were drawn with OpenGL
ES, Quartz or other graphicslibraries. That’s helpful, because it means that OpenGL ES is a first-‐class citizen to Core Animation. However,mixing OpenGL ES content with other content takes time; when used improperly, your application may performtoo slowly
to reach interactive frame rates. The performance penalties for mixing and matching content varydepending on the underlying graphics hardware on the iOS device; devices that use the PowerVR MBX graphicsprocessor incur more severe penalties when compositing
complex scenes. For best results, alway test yourapplication on all iOS devices you intend it to ship on.
For the absolute best performance, your application should rely solely on OpenGL ES to render your content.To do this, size the view that holds your
CAEAGLLayer
object to match the screen, set its
opaque
propertyto
YES,
and ensure that no other Core Animation layers or views are visible. If your OpenGL ES layer is compositedon top of other layers, making your
CAEAGLLayer
object opaque reduces but doesn’t eliminate the performancecost.
If your
CAEAGLLayer
object is blended on top of layers underneath it in the layer hierarchy, the renderbuffer’scolor data must be in a premultiplied alpha format to be composited correctly by
Core Animation. BlendingOpenGL ES content on top of other content has a severe performance penalty.
相关文章推荐
- EAGLLayer.opaque 设置为 YES
- EAGLLayer.opaque 设置为 YES
- [BS-16] 尽量将View的Opaque属性设置为YES(默认就是YES)
- 对Layer 进行操作时设置masks 为YES 的 前因后果
- layer.msg(msg, time, parme)设置图标问题
- 设置view的layer属性方法
- cocos 跳坑记录之Layer的锚点设置
- android: shape、selector、layer-list的使用做出设置按钮样式
- iOS中UITextField设置"secureTextEntry=YES"时"clearsOnBeginEditing"无效
- No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=i386). 这样设置
- 使用灵活的selector layer-list item 组合来设置button的背景
- How to set globe layer cache properties(如何设置globe图层的缓存属性)
- 在xib和storyBoard上设置layer属性的两种方法
- jquery的layer弹出层框架,如果设置 iframe弹出一个页面里是表单提交,提交完怎么关闭弹出层
- FeatureLayer tooltip显示设置
- 正确设置CATextLayer的Font
- jquery的layer弹出层框架,如果设置 iframe弹出一个页面里是表单提交,提交完怎么关闭弹出层
- 通过设置UIView得layer实现圆角矩形
- view.layer.shouldRasterize = YES(光栅化)的使用 及图片性能整理
- openlayer 设置popup窗口始终在上方显示