zoukankan      html  css  js  c++  java
  • Core Animation Manages Your App’s Content

    Core Animation 是对现有图片的操作函数。

    https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/CoreAnimation_guide/Introduction/Introduction.html

    Core Animation Manages Your App’s Content

    Core Animation is not a drawing system itself. It is an infrastructure for compositing and manipulating your app’s content in hardware. At the heart of this infrastructure are layer objects, which you use to manage and manipulate your content. A layer captures your content into a bitmap that can be manipulated easily by the graphics hardware. In most apps, layers are used as a way to manage the content of views but you can also create standalone layers depending on your needs.

    All you have to do is configure a few animation parameters (such as the start and end points) and tell Core Animation to start. Core Animation does the rest, handing most of the actual drawing work off to the onboard graphics hardware to accelerate the rendering. This automatic graphics acceleration results in high frame rates and smooth animations without burdening the CPU and slowing down your app.

    The Layer-Based Drawing Model

    Most layers do not do any actual drawing in your app. Instead, a layer captures the content your app provides and caches it in a bitmap, which is sometimes referred to as the backing store. When you subsequently change a property of the layer, all you are doing is changing the state information associated with the layer object. When a change triggers an animation, Core Animation passes the layer’s bitmap and state information to the graphics hardware, which does the work of rendering the bitmap using the new information, as shown in Figure 1-1. Manipulating the bitmap in hardware yields much faster animations than could be done in software.

    Figure 1-1  How Core Animation draws content

    basics_layer_rendering_2x.png

  • 相关阅读:
    深度残差网络的理解
    迪士尼收购福克斯,传媒巨头江山瓦解?
    穷人的噩梦:来自金融公司的高利贷
    智能家居沦为家暴的“新工具”?
    墨西哥“死亡选举”导致近 150 名政客被杀
    推荐系统
    多线程编程
    two sum
    python 操作mysql
    天才大猩猩可可去世,享年 46 岁
  • 原文地址:https://www.cnblogs.com/feng9exe/p/6733898.html
Copyright © 2011-2022 走看看