- A new feature: support for low-latency canvas context preferences
Hint for low latency canvas contexts
- Solve the problem?
- When we use the canvas element to draw, canvas painting operation to be presented to the page, you need to have a process of sync with the DOM, a process that in some cases there will be a delay, if the delay exceeds 50 milliseconds, users can significantly feel. For example, in a painting class Web APP, if a user with a brushed faster, the user's eyes and hand drawing operations can not be synchronized and coordinated, giving users the feeling of slow, making the application more difficult use.
- Solutions
- Since conventional synchronization mechanism, many synthesis operation is present on the system implemented, if possible when creating a canvas context (i.e., rendering environment), to prompt (Hint) system to bypass the conventional mechanisms use the DOM updating another set mechanism , as much as possible to skip some of the synthetic steps (contents of the internal buffer is implemented directly in the canvas in some cases transmitted directly to the display controller), then you can eliminate the delay caused by the synthetic steps. (It is called "prompt", because not all supported systems or all cases)
- Solution
- In canvas.getContext () method to add the second parameter desynchronized (desynchronized) option, when this option is true, that create low latency rendering environment (context).
- Examples of Use
- Relevant information
- Low-latency rendering with the desynchronized hint (desynchronized option details)
developers.google.com/web/updates...
- Low-latency rendering with the desynchronized hint (desynchronized option details)
- Solve the problem?
- Two new features: support for file sharing via Web Share API
- background knowledge
- Before Web Share norms did not appear to share resources on a web page is completely controlled by the browser, you can only do simple link, photo sharing; after Web Share API appear, will be open to sharing a web application that allows web application itself call to share the operating system, will share the page with resources (images, audio and video, files, etc.) to the application installed in the system. The update of Chrome, is to implement support for file sharing Web Share specifications.
- Examples of Use
- Step one: Check the properties
canShare is used to check whether to support file sharing - Step two: realization
Tip: One way to share access to files can be <input type = file> get
- Step one: Check the properties
- Relevant information
- Web Share API currently supports shared file types
docs.google.com/document/d/...- Audio
- Image
- Text
- Video
- Introducing the Web Share API (详细介绍 Web Share API)
developers.google.com/web/updates… - Share files with Web Share (Web Share API and its application tutorial)
developers.google.com/web/updates... - Demo (to be tested on the phone)
wicg.github.io/web-share/d...
- Web Share API currently supports shared file types
- background knowledge
- New features three: the numeric literal expression supports the use of an underscore "_" beautification
- Solve the problem?
- When the value is too large, its literal expression is too long, affect the reading, for example: 1 billion this value, if you do not count the number of digits, it is difficult to see direct its value in billions
- Solution
- Support as a separator used to enhance the readability of _ such as: 1_000_000_000
- note
- 1. _ symbol can only be used between the digital and digital
- 2. Two or more consecutive _ is not in line with the syntax
- 3. So like 3._14, _2.71,1.6__2 these expressions are ungrammatical
- Solve the problem?
- The associated document
- Developer Tools Chrome 75 new features
mubu.com/doc/7FnUFrg... - Chrome 74 new features
mubu.com/doc/iLYf0K7... - Chrome update log directory
mubu.com/doc/AObcWUR...
- Developer Tools Chrome 75 new features
- Reference material
- Compiled from: New in Chrome 75
developers.google.com/web/updates...
- Compiled from: New in Chrome 75
- other instructions
- This paper also published in the
- Curtain platform: mubu.com/doc/mz-ZAFi...
- Nuggets platform: juejin.im/editor/post...
- Author: West Wing to the rain
I was the greatest invention of the 21st century - A reward: your coin, it is likely that training the next generation of Bill Gates
- Contact & AC & hire
- This paper also published in the
Reproduced in: https: //juejin.im/post/5d05da99f265da1b7004a79b