diff options
Diffstat (limited to 'src/sna/sna.h')
-rw-r--r-- | src/sna/sna.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/sna/sna.h b/src/sna/sna.h index 1e6a803a..a1737c11 100644 --- a/src/sna/sna.h +++ b/src/sna/sna.h @@ -422,7 +422,17 @@ static inline Bool pixmap_is_scanout(PixmapPtr pixmap) return pixmap == screen->GetScreenPixmap(screen); } -struct sna_pixmap *sna_pixmap_attach(PixmapPtr pixmap); +struct sna_pixmap *_sna_pixmap_attach(PixmapPtr pixmap); +inline static struct sna_pixmap *sna_pixmap_attach(PixmapPtr pixmap) +{ + struct sna_pixmap *priv; + + priv = sna_pixmap(pixmap); + if (priv) + return priv; + + return _sna_pixmap_attach(pixmap); +} PixmapPtr sna_pixmap_create_upload(ScreenPtr screen, int width, int height, int depth); |