summaryrefslogtreecommitdiff
path: root/glx/glxdri2.c
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2016-03-31 15:50:34 -0400
committerAdam Jackson <ajax@redhat.com>2016-05-11 11:23:20 -0400
commit0ba4e251a1012bd5a2eab83e2c51006ec3805394 (patch)
tree5e0b5d648f74648882ef0326db06ac7a9afa7460 /glx/glxdri2.c
parentf523ebb5492a2e12b76a8b5b7f1b0e5efd4a8040 (diff)
glx: Code motion
No functional change, just rearranging some code to make later commits more obvious. Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'glx/glxdri2.c')
-rw-r--r--glx/glxdri2.c86
1 files changed, 43 insertions, 43 deletions
diff --git a/glx/glxdri2.c b/glx/glxdri2.c
index d1fc3f9fa..253d06611 100644
--- a/glx/glxdri2.c
+++ b/glx/glxdri2.c
@@ -98,21 +98,6 @@ struct __GLXDRIdrawable {
};
static void
-__glXDRIdrawableDestroy(__GLXdrawable * drawable)
-{
- __GLXDRIdrawable *private = (__GLXDRIdrawable *) drawable;
- const __DRIcoreExtension *core = private->screen->core;
-
- FreeResource(private->dri2_id, FALSE);
-
- (*core->destroyDrawable) (private->driDrawable);
-
- __glXDrawableRelease(drawable);
-
- free(private);
-}
-
-static void
copy_box(__GLXdrawable * drawable,
int dst, int src,
int x, int y, int w, int h)
@@ -134,6 +119,24 @@ copy_box(__GLXdrawable * drawable,
}
}
+/* white lie */
+extern glx_func_ptr glXGetProcAddressARB(const char *);
+
+static void
+__glXDRIdrawableDestroy(__GLXdrawable * drawable)
+{
+ __GLXDRIdrawable *private = (__GLXDRIdrawable *) drawable;
+ const __DRIcoreExtension *core = private->screen->core;
+
+ FreeResource(private->dri2_id, FALSE);
+
+ (*core->destroyDrawable) (private->driDrawable);
+
+ __glXDrawableRelease(drawable);
+
+ free(private);
+}
+
static void
__glXDRIdrawableCopySubBuffer(__GLXdrawable * drawable,
int x, int y, int w, int h)
@@ -339,32 +342,6 @@ static __GLXtextureFromPixmap __glXDRItextureFromPixmap = {
__glXDRIreleaseTexImage
};
-static void
-__glXDRIscreenDestroy(__GLXscreen * baseScreen)
-{
- int i;
-
- ScrnInfoPtr pScrn = xf86ScreenToScrn(baseScreen->pScreen);
- __GLXDRIscreen *screen = (__GLXDRIscreen *) baseScreen;
-
- (*screen->core->destroyScreen) (screen->driScreen);
-
- dlclose(screen->driver);
-
- __glXScreenDestroy(baseScreen);
-
- if (screen->driConfigs) {
- for (i = 0; screen->driConfigs[i] != NULL; i++)
- free((__DRIconfig **) screen->driConfigs[i]);
- free(screen->driConfigs);
- }
-
- pScrn->EnterVT = screen->enterVT;
- pScrn->LeaveVT = screen->leaveVT;
-
- free(screen);
-}
-
static Bool
dri2_convert_glx_attribs(__GLXDRIscreen *screen, unsigned num_attribs,
const uint32_t *attribs,
@@ -931,8 +908,31 @@ initializeExtensions(__GLXscreen * screen)
}
}
-/* white lie */
-extern glx_func_ptr glXGetProcAddressARB(const char *);
+static void
+__glXDRIscreenDestroy(__GLXscreen * baseScreen)
+{
+ int i;
+
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(baseScreen->pScreen);
+ __GLXDRIscreen *screen = (__GLXDRIscreen *) baseScreen;
+
+ (*screen->core->destroyScreen) (screen->driScreen);
+
+ dlclose(screen->driver);
+
+ __glXScreenDestroy(baseScreen);
+
+ if (screen->driConfigs) {
+ for (i = 0; screen->driConfigs[i] != NULL; i++)
+ free((__DRIconfig **) screen->driConfigs[i]);
+ free(screen->driConfigs);
+ }
+
+ pScrn->EnterVT = screen->enterVT;
+ pScrn->LeaveVT = screen->leaveVT;
+
+ free(screen);
+}
enum {
GLXOPT_VENDOR_LIBRARY,