GNOME Bugzilla – Bug 732343
Add ::first-frame signal to MetaWindowActor
Last modified: 2014-06-27 14:38:53 UTC
This signal is emitted the first time a frame of contents of the window is completed by the application and has been drawn on the screen. If you connect to this signal in response to the MetaDisplay::window-created signal, you can be sure that the your handler will be called if the window is ever drawn to the screen. (Connecting to an existing window that has already been drawn to the screen is not useful.)
Created attachment 279394 [details] [review] Add ::first-frame signal to MetaWindowActor
Created attachment 279400 [details] [review] Add ::first-frame signal to MetaWindowActor This signal is emitted the first time a frame of contents of the window is completed by the application and has been drawn on the screen. This is meant to be used for performance measurement of application startup.
Created attachment 279403 [details] [review] Add ::first-frame signal to MetaWindowActor This signal is emitted the first time a frame of contents of the window is completed by the application and has been drawn on the screen. This is meant to be used for performance measurement of application startup.
Review of attachment 279403 [details] [review]: One minor nit, otherwise looks good. ::: src/compositor/meta-window-actor.c @@ +112,2 @@ guint updates_frozen : 1; + guint first_frame_state : 2; Not using the FirstFrameState type? Any reason for the typedef, then?
(In reply to comment #4) > Review of attachment 279403 [details] [review]: > > One minor nit, otherwise looks good. > > ::: src/compositor/meta-window-actor.c > @@ +112,2 @@ > guint updates_frozen : 1; > + guint first_frame_state : 2; > > Not using the FirstFrameState type? Any reason for the typedef, then? You can't use the type here and use the bitfield, since the enum type might be signed, and 'int first_frame_state : 2' has the values -2,-1,0,1. Not using a bitfield - well, since we're already doing it for the booleans, using 32 bits for < 2 bits of information seemed inconsistent... even if it doesn't matter at all in the big scheme of things. Removing the typedef and having an anonymous enum? I think the typedef name is slightly useful documentation. What I'll do is just add a comment: guint first_frame_state : 2; /* FirstFrameState */
Attachment 279403 [details] pushed as 9c6e527 - Add ::first-frame signal to MetaWindowActor