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 772707 - [Wayland] Race condition in cogl_wayland_onscreen_resize()
[Wayland] Race condition in cogl_wayland_onscreen_resize()
Status: RESOLVED FIXED
Product: cogl
Classification: Platform
Component: Wayland
git master
Other Linux
: Normal normal
: ---
Assigned To: Cogl maintainer(s)
Cogl maintainer(s)
Depends on:
Blocks: WaylandRelated
 
 
Reported: 2016-10-10 15:08 UTC by Olivier Fourdan
Modified: 2016-10-12 11:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH] wayland-winsys: Take possible pending resize into account (1.11 KB, patch)
2016-10-10 15:12 UTC, Olivier Fourdan
committed Details | Review

Description Olivier Fourdan 2016-10-10 15:08:49 UTC
Description:

When using totem on Wayland, switching back and forth between fullscreen and normal, the content may sometimes not be sized correctly.

How reproducible:

Randomly

Additional data:

I suspect this is a race condition in cogl_wayland_onscreen_resize() which checks if the cogl framebuffer width/height is different from the given new width/height, but there might be already a resize pending of a different size.
Comment 1 Olivier Fourdan 2016-10-10 15:12:03 UTC
Created attachment 337332 [details] [review]
[PATCH] wayland-winsys: Take possible pending resize into account

When doing two resizes in a row, a pending resize may be different from
the new size whereas the cogl framebuffer is already of the same size,
in which case the new resize might be erroneously ignored.
Comment 2 Emmanuele Bassi (:ebassi) 2016-10-11 09:30:03 UTC
Review of attachment 337332 [details] [review]:

Looks good to me.
Comment 3 Olivier Fourdan 2016-10-11 11:23:38 UTC
Comment on attachment 337332 [details] [review]
[PATCH] wayland-winsys: Take possible pending resize into account

attachment 337332 [details] [review] has been pushed to git master as commit 5440b24 - wayland-winsys: Take possible pending resize into account
Comment 4 Olivier Fourdan 2016-10-12 06:45:50 UTC
I reckon this should be pushed in branch 1.22 as well, want me to push it there as well?
Comment 5 Emmanuele Bassi (:ebassi) 2016-10-12 10:21:32 UTC
(In reply to Olivier Fourdan from comment #4)
> I reckon this should be pushed in branch 1.22 as well, want me to push it
> there as well?

Sorry, I should have been more explicit: cogl-1.22 is, for all intents and purposes, the 'master' branch that GNOME relies on.

The 'master' branch is unused and it's unlikely to even build.
Comment 6 Olivier Fourdan 2016-10-12 11:49:26 UTC
(In reply to Emmanuele Bassi (:ebassi) from comment #5)
> (In reply to Olivier Fourdan from comment #4)
> > I reckon this should be pushed in branch 1.22 as well, want me to push it
> > there as well?
> 
> Sorry, I should have been more explicit: cogl-1.22 is, for all intents and
> purposes, the 'master' branch that GNOME relies on.
> 
> The 'master' branch is unused and it's unlikely to even build.

Oh... right... 

So attachment 337332 [details] [review] pushed to branch "cogl-1.22" as commit e0fda73 - wayland-winsys: Take possible pending resize into account