GNOME Bugzilla – Bug 698783
Add a paint callback for ClutterStage
Last modified: 2013-05-06 17:06:28 UTC
Needed for the Shell. Using the repaint function is too late, as the Shell needs to get notified of the frame completion before we do a buffer swap.
Created attachment 242361 [details] [review] stage: Add a paint callback The ClutterActor::paint signal is deprecated, and connecting to it even to get notifications will disable clipped redraws because of violations of the paint volume. The only actual valid use case for notifications of a successful frame is on the ClutterStage, so we should add new (experimental) API for it, so that users can actually subscribe to it — at least if you're writing a compositor. Shoving a signal in a performance critical path is not an option, and I'm not sure I want to commit to an API like this yet. I reserve the right to revisit this decision in the future.
Created attachment 242365 [details] [review] stage: Add a paint callback / v2.0 Updated, now with a proper symbol for the callback type.
Created attachment 242367 [details] [review] stage: Add a paint callback / v3.0 This time, with a static invoke_paint_callback().
Review of attachment 242367 [details] [review]: Looks good, and fixes the problem with Mutter - the problem is that the CLUTTER_REPAINT_FLAGS_POST_PAINT function runs *after* swap, which is too late to send notifications back to a client, since Cogl blocks until VBlank in some cases, such as partial stage updates.
Pushed to clutter-1.16, will be in the next snapshot