Overview of investigation and results
Two main issues were investigated:
- HTML5 canvas demos not getting repaints
- Scrolling performance being poor compared to the image translation reference
HTML5 canvas demos not getting repaints
This turned out to be caused by higher priority sources starving clutter relayout/repaint cycle. It was fixed by lowering the priority of WTF and WebCore sources in 3c09afd. On a specific test, CPU is being used a lot by the kernel and the canvas only gets repainted upon input events. This needs further investigation. The perf tool has not been helpful, nor has GLib debugging, for now. This is not an issue on the desktop.
A while ago, the Clutter actors tiled backing store implementation was brought up to date with Clutter's latest developments, which means it started using the ClutterContent/ClutterCanvas APIs instead of the deprecated ClutterCairoTexture. It turned out that ClutterCanvas kept the CoglBuffer created from the Cairo context cached, but recreated the CoglTexture for every repaint. By keeping the CoglTexture in cache, we match the performance we used to have before that change. A patch has been added to our Clutter package, and the fix has also been submitted upstream. It has been reviewed and pushed already.