[eglnative] Set the SYNC_MATRICES on stage realization
authorEmmanuele Bassi <ebassi@linux.intel.com>
Fri, 16 Jan 2009 22:13:44 +0000 (22:13 +0000)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Fri, 16 Jan 2009 22:13:44 +0000 (22:13 +0000)
Since the stage in the EGL native backend only has one size, and it
is determined at realization, we can simply set the SYNC_MATRICES
private flag and let _clutter_stage_maybe_setup_viewport() set up
the GL viewport at the first redraw.

clutter/eglnative/clutter-stage-egl.c

index f56eaf1..a767d55 100644 (file)
@@ -199,6 +199,12 @@ clutter_stage_egl_realize (ClutterActor *actor)
           CLUTTER_ACTOR_UNSET_FLAGS (actor, CLUTTER_ACTOR_REALIZED);
           return;
         }
+
+      /* since we only have one size and it cannot change, we
+       * just need to update the GL viewport now that we have
+       * been realized
+       */
+      CLUTTER_SET_PRIVATE_FLAGS (actor, CLUTTER_ACTOR_SYNC_MATRICES);
     }
   else
     {