This repository has been archived by the owner on Aug 11, 2022. It is now read-only.
Examples of async rendering from non-web systems #16
Labels
info
this issue provides some useful information
Let's use this issue to track links to examples we can learn from outside of the web.
Android surfaceRedrawNeededAsync:
https://developer.android.com/reference/android/opengl/GLSurfaceView#surfaceRedrawNeededAsync(android.view.SurfaceHolder,%20java.lang.Runnable)
This is a new feature in Android O. When the framework calls this method, it is requesting a need to have a surface of an activity redrawn, but it can be done asynchronously in the background. The second parameter is a callback to call when rendering is complete.
This API is intended for scenarios such as the phone rotating during display of web content. Since Chrome does all rendering asynchronously, it is not able to draw to the surface immediately and must use the async version supplied here. On pre-Android O phones Chrome does not have this API, and so must either draw the old, cached frame (stretched to the new dimensions of the phone, which is probably ugly), or draw a solid color. For fullscreen video it actually draws solid black until rendering
is complete. With Android O, the framework will wait for Chrome to draw new content so it can present
atomically.
The text was updated successfully, but these errors were encountered: