Set the SYNC_MATRICES flag when a stage is first realized
The stage will usually be painted before the first ConfigureNotify arrives so we need to set the SYNC_MATRICES flag to ensure that the viewport will be correct for that paint. Unfortunately this means that the viewport will be set again once the ConfigureNotify is received but compared to rendering an initial invalid scene I think it is the lesser of two evils.
This commit is contained in:
parent
cdb360107b
commit
54f4ed775c
@ -258,6 +258,11 @@ clutter_stage_realize (ClutterActor *self)
|
||||
|
||||
CLUTTER_ACTOR_SET_FLAGS (self, CLUTTER_ACTOR_REALIZED);
|
||||
|
||||
/* Make sure the viewport and projection matrix are valid for the
|
||||
first paint (which will likely occur before the ConfigureNotify
|
||||
is received) */
|
||||
CLUTTER_SET_PRIVATE_FLAGS (self, CLUTTER_ACTOR_SYNC_MATRICES);
|
||||
|
||||
g_assert (priv->impl != NULL);
|
||||
CLUTTER_ACTOR_GET_CLASS (priv->impl)->realize (priv->impl);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user