The GPU has a maximum limit for each pixel that can be drawn (the so-called fill rate). In this case, all the pixels of the entire screen can be easily drawn. However, dropped frames may occur if the same area needs to be constantly redrawn due to overlapping layer relationships.
The GPU will forego drawing pixels that are completely obscured by other layers, but calculating whether a layer is occluded is also quite complicated and consumes processor resources. Also, the resources consumed by merging transparent overlapping pixels (ie, blends) of different layers are also quite objective. Therefore, in order to speed up the processing process, it is not always necessary to use a transparent layer.
In any case, you should do this:
Set a fixed, opaque color for the view's backgroundColor property
Set opaque attribute to YES
This reduces mixing behavior (because the compiler knows that nothing after the layer will have an effect on the final pixel color) and the calculation is accelerated, avoiding overdrawing behavior because Core Animation can discard everything that is completely obscured. Layers, not every pixel.
If you use images, try to avoid transparency unless it is necessary. If the image is to be displayed before a fixed background color or a fixed background image, you do not need to move relative to the foreground. You only need to pre-fill the background image to avoid runtime color mixing.
If it is text, a white background UILabel (or other color) will be more efficient than a transparent background.
Finally, using the shouldRasterize attribute wisely, you can collapse a fixed layer system into a single image so that you do not need to recompose each frame, and there will be no mixing or over-drawing between sublayers. Performance problem.
Laptop Stand Holder Adjustable,Laptop Stand Holder Desk,Laptop Stand Holder Ergonomic,Laptop Stand Holder Ergonomic Adjustable,etc.
Shenzhen Chengrong Technology Co.ltd is a high-quality enterprise specializing in metal stamping and CNC production for 12 years. The company mainly aims at the R&D, production and sales of Notebook Laptop Stands and Mobile Phone Stands. From the mold design and processing to machining and product surface oxidation, spraying treatment etc ,integration can fully meet the various processing needs of customers. Have a complete and scientific quality management system, strength and product quality are recognized and trusted by the industry, to meet changing economic and social needs .
Laptop Stand Holder Adjustable,Laptop Stand Holder Desk,Laptop Stand Holder Ergonomic,Laptop Stand Holder Ergonomic Adjustable
Shenzhen ChengRong Technology Co.,Ltd. , https://www.dglaptopstandsupplier.com