[clutter] cogl: Pack ClutterStageCogl a bit more



commit b0300a624719196a9e0291d140fe6166c791ae64
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Wed Jul 8 11:15:54 2015 +0100

    cogl: Pack ClutterStageCogl a bit more
    
    We should rearrange the fields a bit so they get packed without holes,
    and aligned with cacheline boundaries.

 clutter/cogl/clutter-stage-cogl.h |   21 +++++++++++----------
 1 files changed, 11 insertions(+), 10 deletions(-)
---
diff --git a/clutter/cogl/clutter-stage-cogl.h b/clutter/cogl/clutter-stage-cogl.h
index e13e58d..8455405 100644
--- a/clutter/cogl/clutter-stage-cogl.h
+++ b/clutter/cogl/clutter-stage-cogl.h
@@ -35,20 +35,27 @@ struct _ClutterStageCogl
 
   CoglOnscreen *onscreen;
 
-  gint64 last_presentation_time;
   float refresh_rate;
+  int pending_swaps;
 
-  gint64 update_time;
-  gint pending_swaps;
   CoglFrameClosure *frame_closure;
 
+  gint64 last_presentation_time;
+  gint64 update_time;
+
   /* We only enable clipped redraws after 2 frames, since we've seen
    * a lot of drivers can struggle to get going and may output some
    * junk frames to start with. */
-  unsigned long frame_count;
+  unsigned int frame_count;
 
   cairo_rectangle_int_t bounding_redraw_clip;
 
+  /* Stores a list of previous damaged areas */
+#define DAMAGE_HISTORY_MAX 16
+#define DAMAGE_HISTORY(x) ((x) & (DAMAGE_HISTORY_MAX - 1))
+  cairo_rectangle_int_t damage_history[DAMAGE_HISTORY_MAX];
+  unsigned int damage_index;
+
   guint initialized_redraw_clip : 1;
 
   /* TRUE if the current paint cycle has a clipped redraw. In that
@@ -56,12 +63,6 @@ struct _ClutterStageCogl
   guint using_clipped_redraw : 1;
 
   guint dirty_backbuffer     : 1;
-
-  /* Stores a list of previous damaged areas */
-#define DAMAGE_HISTORY_MAX 16
-#define DAMAGE_HISTORY(x) ((x) & (DAMAGE_HISTORY_MAX - 1))
-  cairo_rectangle_int_t damage_history[DAMAGE_HISTORY_MAX];
-  unsigned damage_index;
 };
 
 struct _ClutterStageCoglClass


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]