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 761565 - actor.get_transformed_size/position work wrong after a change in stage size
actor.get_transformed_size/position work wrong after a change in stage size
Status: RESOLVED OBSOLETE
Product: clutter
Classification: Platform
Component: ClutterStage
1.25.x
Other Linux
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2016-02-04 18:06 UTC by Owen Taylor
Modified: 2021-06-10 11:33 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Owen Taylor 2016-02-04 18:06:05 UTC
clutter_actor_get_transformed_size()/position() end up at clutter_stage_real_apply_transform() which does:

 cogl_matrix_multiply (matrix, matrix, &priv->view);

But priv->view is updated in clutter_init() and lazily in _clutter_stage_maybe_setup_viewport().

This is a regression as of 2011 - it looks like it would have worked right before eef9078f892c3

The clean thing seems to do seems to separate out the idea:

 "The cogl viewport is dirty and needs to be set again"

From:

 "The computed fields like priv->view are dirty and need to be recomputed"

And then clutter_stage_real_apply_transform() could get priv->view updated without affecting the cogl state.
Comment 1 Emmanuele Bassi (:ebassi) 2016-02-04 18:32:26 UTC
We also mark the viewport as dirty when changing the allocation of the stage, and when we do a pick, since it can be clipped and we fudge the viewport in that case.

Are there other cases where the viewport should be reset?
Comment 2 Owen Taylor 2016-02-04 20:31:06 UTC
(In reply to Emmanuele Bassi (:ebassi) from comment #1)
> We also mark the viewport as dirty when changing the allocation of the
> stage, and when we do a pick, since it can be clipped and we fudge the
> viewport in that case.
> 
> Are there other cases where the viewport should be reset?

the pick case is the the only case I know where we would want to mark the viewport dirty without marking the state dirty. For a lot of things both should be marked dirty at once.
Comment 3 Jonas Ådahl 2019-09-20 13:24:01 UTC
Viewport and perspective updated on demand as of b69d2aa6a0e0e8d69354f6eda0bb9ab68a76f2ee.
Comment 4 Jonas Ådahl 2019-09-20 13:24:32 UTC
Realized this was the clutter issue tracker and not mutters, nm.
Comment 5 André Klapper 2021-06-10 11:33:03 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version of clutter, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a ticket at
  https://gitlab.gnome.org/GNOME/clutter/-/issues/

Thank you for your understanding and your help.