diff options
author | Eric Anholt <eric@anholt.net> | 2015-07-07 17:21:55 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2015-07-10 09:42:57 -0700 |
commit | 80b6652c9fb9cdff91e92fa16c07e2cc63b06f44 (patch) | |
tree | 126b8a408eea89df3ec9d25584faa414d5a6bd50 /glamor/glamor_priv.h | |
parent | a2a2f6e34bd49e7ae31779274d52e800595660bc (diff) |
glamor: Drop a bunch of glamor_priv == NULL checks.
Now that it's always non-null when the pixmap is non-null, we don't
need so much of this. glamor_get_pixmap_private() itself still
accepts a NULL pixmap and returns NULL, because of glamor_render.c
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'glamor/glamor_priv.h')
-rw-r--r-- | glamor/glamor_priv.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/glamor/glamor_priv.h b/glamor/glamor_priv.h index fe65d9b79..d085ff258 100644 --- a/glamor/glamor_priv.h +++ b/glamor/glamor_priv.h @@ -419,7 +419,7 @@ glamor_pixmap_drm_only(PixmapPtr pixmap) { glamor_pixmap_private *priv = glamor_get_pixmap_private(pixmap); - return priv && priv->type == GLAMOR_DRM_ONLY; + return priv->type == GLAMOR_DRM_ONLY; } /* @@ -430,7 +430,7 @@ glamor_pixmap_is_memory(PixmapPtr pixmap) { glamor_pixmap_private *priv = glamor_get_pixmap_private(pixmap); - return !priv || priv->type == GLAMOR_MEMORY; + return priv->type == GLAMOR_MEMORY; } /* @@ -439,13 +439,13 @@ glamor_pixmap_is_memory(PixmapPtr pixmap) static inline Bool glamor_pixmap_priv_is_large(glamor_pixmap_private *priv) { - return priv && (priv->block_wcnt > 1 || priv->block_hcnt > 1); + return priv->block_wcnt > 1 || priv->block_hcnt > 1; } static inline Bool glamor_pixmap_priv_is_small(glamor_pixmap_private *priv) { - return priv && priv->block_wcnt <= 1 && priv->block_hcnt <= 1; + return priv->block_wcnt <= 1 && priv->block_hcnt <= 1; } static inline Bool @@ -453,7 +453,7 @@ glamor_pixmap_is_large(PixmapPtr pixmap) { glamor_pixmap_private *priv = glamor_get_pixmap_private(pixmap); - return priv && glamor_pixmap_priv_is_large(priv); + return glamor_pixmap_priv_is_large(priv); } /* * Returns TRUE if pixmap has an FBO @@ -463,7 +463,7 @@ glamor_pixmap_has_fbo(PixmapPtr pixmap) { glamor_pixmap_private *priv = glamor_get_pixmap_private(pixmap); - return priv && priv->gl_fbo == GLAMOR_FBO_NORMAL; + return priv->gl_fbo == GLAMOR_FBO_NORMAL; } static inline void |