Iostransitiontranslate splash Screen Problem Summary

Source: Internet
Author: User

WebKit the structure into layers when the page is drawn, and when the layer is large enough it becomes a large tiled layer. In this way, WebKit does not need to render the entire page each time the page structure changes, but renders the corresponding layer, which is quite important for rendering speed. WebKit will allocate a certain size of the various layers of "backup memory" in memory cache, this is the context of drawing layer, through this context can easily achieve a variety of effects (animation, 3D transformation, etc.), "Backup Memory" memory footprint not only depends on the layer, and the device and display mode is also related, Suppose this is 1:1 on the normal screen, but 1:2 on the retina screen, and this amount will multiply when zoomed in, and a picture is 10x10, and the normal screen is assigned the 10x10,retina initial 20x20. This also indicates that the retina is more memory-intensive. When the layer is large, it means that the "backup memory" consumes more memory, in order to avoid this, WebKit does not draw a large layer to store a large page, for example, the tile layer will be split into a lot of blocks to draw, that is, to occupy as little memory as possible, just to render the part of the visible range. That's why when we scroll through large pages, we find that the following content slowly shows up, and the above content slowly shows up when scrolling up.

The following is a scenario where webkit is divided into layers:

  1. The main container of a page is always a separate tiled layer
  2. When drawing intensive elements, such as <video>, <canvas>
  3. Apply elements of 3D transformations, including Translate3d, Rotate3d, Translatez
  4. When content is enhanced, such as filters, masks, reflections, opacity, transitions, animations
  5. Some special cases will also be, such as position:fixed,-webkit-overflow-scroll:touch
  6. Any content that is covered on a known layer

WebKit does not render the entire allocated memory for such a large layer, so it solves this problem simply by caching the list item elements of the viewable range of the scrolling region.

Workaround:

If the above structure of the multi-figure moving around to see, J-scroller is a very large animation moving layer, we set the J-scroller translate3d (x, Y, z) and transition animation,

The iphone looks like a splash screen when it moves, because WebKit does not draw the entire allocated memory for the J-scroller so large.

In this time we need to cache the list item item element of the scrolling area visual range

Also: When translate uses 2d instead of 3d rendering, we want to set the current animation moving element to be rendered in 3d, with all its child elements hidden back

  

Reference Link: http://www.tuicool.com/articles/rYby6v

Iostransitiontranslate splash Screen Problem Summary

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.