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 732343 - Add ::first-frame signal to MetaWindowActor
Add ::first-frame signal to MetaWindowActor
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2014-06-27 13:37 UTC by Owen Taylor
Modified: 2014-06-27 14:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add ::first-frame signal to MetaWindowActor (3.10 KB, patch)
2014-06-27 13:37 UTC, Owen Taylor
none Details | Review
Add ::first-frame signal to MetaWindowActor (4.06 KB, patch)
2014-06-27 14:10 UTC, Owen Taylor
none Details | Review
Add ::first-frame signal to MetaWindowActor (4.27 KB, patch)
2014-06-27 14:26 UTC, Owen Taylor
committed Details | Review

Description Owen Taylor 2014-06-27 13:37:07 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.)
Comment 1 Owen Taylor 2014-06-27 13:37:10 UTC
Created attachment 279394 [details] [review]
Add ::first-frame signal to MetaWindowActor
Comment 2 Owen Taylor 2014-06-27 14:10:57 UTC
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.
Comment 3 Owen Taylor 2014-06-27 14:26:00 UTC
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.
Comment 4 Jasper St. Pierre (not reading bugmail) 2014-06-27 14:29:00 UTC
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?
Comment 5 Owen Taylor 2014-06-27 14:34:16 UTC
(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 */
Comment 6 Owen Taylor 2014-06-27 14:38:50 UTC
Attachment 279403 [details] pushed as 9c6e527 - Add ::first-frame signal to MetaWindowActor