diff options
author | Keith Packard <keithp@keithp.com> | 2014-08-19 12:34:41 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2014-09-18 15:53:19 -0700 |
commit | 16e429f1f96f984b1ff575875a7a4d7d29b482e2 (patch) | |
tree | 78d8b511f6b4aced2476b8f4214fb48a0c6dd24e /glamor/glamor_priv.h | |
parent | ea7357de90792cbceca6d8d9fdc144e7df8a0fba (diff) |
glamor: Change SET_PIXMAP_FBO_CURRENT from macro to static inline
This is the last function-like macro in glamor_priv.h; change to
static inline like all of the other functions there.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'glamor/glamor_priv.h')
-rw-r--r-- | glamor/glamor_priv.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/glamor/glamor_priv.h b/glamor/glamor_priv.h index aa59e3bcd..51adeefaa 100644 --- a/glamor/glamor_priv.h +++ b/glamor/glamor_priv.h @@ -438,14 +438,6 @@ typedef struct glamor_pixmap_clipped_regions { RegionPtr region; } glamor_pixmap_clipped_regions; -#define SET_PIXMAP_FBO_CURRENT(priv, idx) \ - do { \ - if (priv->type == GLAMOR_TEXTURE_LARGE) { \ - (priv)->large.base.fbo = priv->large.fbo_array[idx]; \ - (priv)->large.box = priv->large.box_array[idx]; \ - } \ - } while(0) - typedef struct glamor_pixmap_private_base { glamor_pixmap_type_t type; enum glamor_fbo_state gl_fbo; @@ -518,6 +510,15 @@ typedef struct glamor_pixmap_private { }; } glamor_pixmap_private; +static inline void +glamor_set_pixmap_fbo_current(glamor_pixmap_private *priv, int idx) +{ + if (priv->type == GLAMOR_TEXTURE_LARGE) { + priv->large.base.fbo = priv->large.fbo_array[idx]; + priv->large.box = priv->large.box_array[idx]; + } +} + static inline glamor_pixmap_fbo * glamor_pixmap_fbo_at(glamor_pixmap_private *priv, int x, int y) { |