summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2015-07-08 11:15:54 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2015-07-08 11:15:54 +0100
commitb0300a624719196a9e0291d140fe6166c791ae64 (patch)
tree9c32434c43ae119717ac32ee5805ed89db6c0e5d
parent938eea175fffd6d6122f7e34a1d74dcf687b6f17 (diff)
downloadclutter-b0300a624719196a9e0291d140fe6166c791ae64.tar.gz
cogl: Pack ClutterStageCogl a bit more
We should rearrange the fields a bit so they get packed without holes, and aligned with cacheline boundaries.
-rw-r--r--clutter/cogl/clutter-stage-cogl.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/clutter/cogl/clutter-stage-cogl.h b/clutter/cogl/clutter-stage-cogl.h
index e13e58d7e..8455405e3 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