After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 729144 - Unnecessary calls to glTexImage2D cause performance degradation
Unnecessary calls to glTexImage2D cause performance degradation
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2014-04-28 20:55 UTC by Gustavo Noronha (kov)
Modified: 2014-05-01 15:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
clutter-canvas: cache the texture to avoid uploads (3.77 KB, patch)
2014-04-28 20:55 UTC, Gustavo Noronha (kov)
committed Details | Review

Description Gustavo Noronha (kov) 2014-04-28 20:55:12 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.
Comment 1 Gustavo Noronha (kov) 2014-04-28 20:55:41 UTC
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.
Comment 2 Emmanuele Bassi (:ebassi) 2014-04-28 21:03:38 UTC
Review of attachment 275379 [details] [review]:

looks good.

please, commit to the clutter-1.18 branch.
Comment 3 Gustavo Noronha (kov) 2014-05-01 15:08:57 UTC
Comment on attachment 275379 [details] [review]
clutter-canvas: cache the texture to avoid uploads

266eac1 on master bf5fe70 on clutter-1.18