GNOME Bugzilla – Bug 729144
Unnecessary calls to glTexImage2D cause performance degradation
Last modified: 2014-05-01 15:09:08 UTC
The test case in question has a bunch of clutter actors getting translated so that parts of them go out of the viewport and back; on the ARM board I am testing, I was getting ~42FPS and quite a bit of CPU usage. perf told me the CPU usage was being caused by glTexImage2D getting called. The patch I'll attach makes CPU usage go down to saner levels and brings FPS up to 60.
Created attachment 275379 [details] [review] clutter-canvas: cache the texture to avoid uploads When an actor carrying canvas content is repainted, it will currently reupload the data from the buffer to a texture. While this is not a performance problem on a desktop, some mobile environments take a big performance hit. This change tracks data changes and only recreates the texture if necessary.
Review of attachment 275379 [details] [review]: looks good. please, commit to the clutter-1.18 branch.
Comment on attachment 275379 [details] [review] clutter-canvas: cache the texture to avoid uploads 266eac1 on master bf5fe70 on clutter-1.18