Now I have a problem that when the UI is poped, 360 video will shake and show poor quality picture. About UI and 360 video, they are showed by GPU(egl). So How they composite by GPU. Can you help mark the code position that UI and 360 video composite on Cobalt?
1 Answers
which version of Cobalt is this?
In Cobalt 11, we render the 360 video during UI rasterization, when we encounter a "MapToMesh" filter node, e.g. https://cobalt.googlesource.com/cobalt/+/release_11/src/cobalt/renderer/rasterizer/skia/render_tree_node_visitor.cc#360 . This calls a callback that eventually lands in this code for rendering the mesh: https://cobalt.googlesource.com/cobalt/+/release_11/src/cobalt/renderer/rasterizer/skia/hardware_rasterizer.cc#479 .
I'm not sure what may be happening, though is true that when the UI appears, it is a more stressful situation for graphics and the GPU, so it is possible that your platform's GPU is being pushed to its limit at this point. Cobalt 11 features two rasterizers and you can try both of them out to see if one gives better results, you would do this in your gyp_configuration.gypi file by defining 'rasterizer_type' to be either 'direct-gles' or 'hardware'.

- 2,517
- 1
- 17
- 10
-
Thank you very much, the cobalt version is release 11. I also tried 'direct-gles' and 'hardware', they are the same, what is the difference about them, and how can I know the platform support direct-gles, my default value is 'hardware'. – Devin Jul 18 '18 at 13:12
-
'direct-gles' implements some of the rendering differently than 'hardware'. It includes number of optimizations that in general should result in a higher frame rate. – Andrew Top Jul 18 '18 at 15:58