[backend] Update the viewport when updating the GL context
Bug 1442 - multistage, same-window resize events invalidate stage When ensuring that the GL context is attached to the correct ClutterStage we need to set the SYNC_MATRICES flag on the stage itself. This is needed in case the size of the new stage does not match the size of the old -- thus requiring a call to glViewport() when the paint cycle starts.
This commit is contained in:
parent
fa996734cf
commit
f4df307ddd
@ -310,6 +310,17 @@ _clutter_backend_ensure_context (ClutterBackend *backend,
|
|||||||
* potential issue of GL calls with no context)
|
* potential issue of GL calls with no context)
|
||||||
*/
|
*/
|
||||||
current_context_stage = stage;
|
current_context_stage = stage;
|
||||||
|
|
||||||
|
/* if the new stage has a different size than the previous one
|
||||||
|
* we need to update the viewport; we do it by simply setting the
|
||||||
|
* SYNC_MATRICES flag and letting the next redraw cycle take care
|
||||||
|
* of calling glViewport()
|
||||||
|
*/
|
||||||
|
if (current_context_stage)
|
||||||
|
{
|
||||||
|
CLUTTER_SET_PRIVATE_FLAGS (current_context_stage,
|
||||||
|
CLUTTER_ACTOR_SYNC_MATRICES);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
CLUTTER_NOTE (MULTISTAGE, "Stage is the same");
|
CLUTTER_NOTE (MULTISTAGE, "Stage is the same");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user