diff options
author | Adam Jackson <ajax@redhat.com> | 2017-06-16 15:44:49 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2017-06-20 16:39:23 -0400 |
commit | 0b1831d043028f7dd6accca19a81e2abd9a145b5 (patch) | |
tree | ecb3271c8e944a9f67de77d363b52f496221982a /glx | |
parent | c33541e59e338cd53f89d94a6898555d350e84aa (diff) |
glx: Remove some indirection around EXT_texture_from_pixmap
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'glx')
-rw-r--r-- | glx/glxcmds.c | 9 | ||||
-rw-r--r-- | glx/glxcontext.h | 14 | ||||
-rw-r--r-- | glx/glxdri2.c | 8 | ||||
-rw-r--r-- | glx/glxdriswrast.c | 8 |
4 files changed, 13 insertions, 26 deletions
diff --git a/glx/glxcmds.c b/glx/glxcmds.c index 508815b9d..ac21136b1 100644 --- a/glx/glxcmds.c +++ b/glx/glxcmds.c @@ -1807,10 +1807,10 @@ __glXDisp_BindTexImageEXT(__GLXclientState * cl, GLbyte * pc) DixReadAccess, &pGlxDraw, &error)) return error; - if (!context->textureFromPixmap) + if (!context->bindTexImage) return __glXError(GLXUnsupportedPrivateRequest); - return context->textureFromPixmap->bindTexImage(context, buffer, pGlxDraw); + return context->bindTexImage(context, buffer, pGlxDraw); } int @@ -1839,11 +1839,10 @@ __glXDisp_ReleaseTexImageEXT(__GLXclientState * cl, GLbyte * pc) DixReadAccess, &pGlxDraw, &error)) return error; - if (!context->textureFromPixmap) + if (!context->releaseTexImage) return __glXError(GLXUnsupportedPrivateRequest); - return context->textureFromPixmap->releaseTexImage(context, - buffer, pGlxDraw); + return context->releaseTexImage(context, buffer, pGlxDraw); } int diff --git a/glx/glxcontext.h b/glx/glxcontext.h index edbd491ff..19d347fdb 100644 --- a/glx/glxcontext.h +++ b/glx/glxcontext.h @@ -35,14 +35,6 @@ * Silicon Graphics, Inc. */ -typedef struct __GLXtextureFromPixmap __GLXtextureFromPixmap; -struct __GLXtextureFromPixmap { - int (*bindTexImage) (__GLXcontext * baseContext, - int buffer, __GLXdrawable * pixmap); - int (*releaseTexImage) (__GLXcontext * baseContext, - int buffer, __GLXdrawable * pixmap); -}; - struct __GLXcontext { void (*destroy) (__GLXcontext * context); int (*makeCurrent) (__GLXcontext * context); @@ -50,7 +42,11 @@ struct __GLXcontext { int (*copy) (__GLXcontext * dst, __GLXcontext * src, unsigned long mask); Bool (*wait) (__GLXcontext * context, __GLXclientState * cl, int *error); - __GLXtextureFromPixmap *textureFromPixmap; + /* EXT_texture_from_pixmap */ + int (*bindTexImage) (__GLXcontext * baseContext, + int buffer, __GLXdrawable * pixmap); + int (*releaseTexImage) (__GLXcontext * baseContext, + int buffer, __GLXdrawable * pixmap); /* ** list of context structs diff --git a/glx/glxdri2.c b/glx/glxdri2.c index 484b4aeab..eae3748a9 100644 --- a/glx/glxdri2.c +++ b/glx/glxdri2.c @@ -335,11 +335,6 @@ __glXDRIreleaseTexImage(__GLXcontext * baseContext, return Success; } -static __GLXtextureFromPixmap __glXDRItextureFromPixmap = { - __glXDRIbindTexImage, - __glXDRIreleaseTexImage -}; - static Bool dri2_convert_glx_attribs(__GLXDRIscreen *screen, unsigned num_attribs, const uint32_t *attribs, @@ -561,7 +556,8 @@ __glXDRIscreenCreateContext(__GLXscreen * baseScreen, context->base.makeCurrent = __glXDRIcontextMakeCurrent; context->base.loseCurrent = __glXDRIcontextLoseCurrent; context->base.copy = __glXDRIcontextCopy; - context->base.textureFromPixmap = &__glXDRItextureFromPixmap; + context->base.bindTexImage = __glXDRIbindTexImage; + context->base.releaseTexImage = __glXDRIreleaseTexImage; context->base.wait = __glXDRIcontextWait; create_driver_context(context, screen, config, driShare, num_attribs, diff --git a/glx/glxdriswrast.c b/glx/glxdriswrast.c index ed0469fd6..d7d64b3d9 100644 --- a/glx/glxdriswrast.c +++ b/glx/glxdriswrast.c @@ -208,11 +208,6 @@ __glXDRIreleaseTexImage(__GLXcontext * baseContext, return Success; } -static __GLXtextureFromPixmap __glXDRItextureFromPixmap = { - __glXDRIbindTexImage, - __glXDRIreleaseTexImage -}; - static __GLXcontext * __glXDRIscreenCreateContext(__GLXscreen * baseScreen, __GLXconfig * glxConfig, @@ -248,7 +243,8 @@ __glXDRIscreenCreateContext(__GLXscreen * baseScreen, context->base.makeCurrent = __glXDRIcontextMakeCurrent; context->base.loseCurrent = __glXDRIcontextLoseCurrent; context->base.copy = __glXDRIcontextCopy; - context->base.textureFromPixmap = &__glXDRItextureFromPixmap; + context->base.bindTexImage = __glXDRIbindTexImage; + context->base.releaseTexImage = __glXDRIreleaseTexImage; context->driContext = (*core->createNewContext) (screen->driScreen, |