diff options
author | George Sapountzis <gsapountzis@gmail.com> | 2010-03-14 11:36:46 +0200 |
---|---|---|
committer | George Sapountzis <gsapountzis@gmail.com> | 2010-03-15 01:17:17 +0200 |
commit | c1bde793598bcb5d5f8744c290a66ea6586eb29f (patch) | |
tree | 0fa035874103498bf4711ae360dadc8efb63d6e9 /src/mesa/drivers/dri/swrast/swrast_priv.h | |
parent | cf8a1caa231b748d3ba7c776ab076ad3de99e963 (diff) |
dri/swrast: port to dri_sw (drawable)
Diffstat (limited to 'src/mesa/drivers/dri/swrast/swrast_priv.h')
-rw-r--r-- | src/mesa/drivers/dri/swrast/swrast_priv.h | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/swrast/swrast_priv.h b/src/mesa/drivers/dri/swrast/swrast_priv.h index 130598bbd8..8e87f644c3 100644 --- a/src/mesa/drivers/dri/swrast/swrast_priv.h +++ b/src/mesa/drivers/dri/swrast/swrast_priv.h @@ -80,6 +80,30 @@ swrast_context(GLcontext *ctx) return (struct dri_context *) ctx; } +struct dri_drawable +{ + /* mesa */ + GLframebuffer Base; + + /* dri */ + __DRIdrawable *dPriv; + + /* scratch row for optimized front-buffer rendering */ + char *row; +}; + +static INLINE struct dri_drawable * +dri_drawable(__DRIdrawable * driDrawPriv) +{ + return (struct dri_drawable *)driDrawPriv->driverPrivate; +} + +static INLINE struct dri_drawable * +swrast_drawable(GLframebuffer *fb) +{ + return (struct dri_drawable *) fb; +} + struct swrast_renderbuffer { struct gl_renderbuffer Base; @@ -89,12 +113,6 @@ struct swrast_renderbuffer { GLuint bpp; }; -static INLINE __DRIdrawable * -swrast_drawable(GLframebuffer *fb) -{ - return (__DRIdrawable *) fb; -} - static INLINE struct swrast_renderbuffer * swrast_renderbuffer(struct gl_renderbuffer *rb) { |