diff options
author | Chia-I Wu <[email protected]> | 2011-06-24 13:30:35 +0900 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2011-06-24 16:49:27 +0900 |
commit | febf5e4147612641fc23f202d5813958bee3af13 (patch) | |
tree | 5342ab5aa4f1f96d373173c5610311cbe639ad12 /src/gallium/state_trackers/egl/drm | |
parent | 875a1f8960bbbb56fda291f19b1f119fc23b17fe (diff) |
st/egl: make native_buffer interface typed
Use a typed struct to describe the native buffer and let the backends
map the native buffer to winsys_handle for
resource_from_handle/resource_to_handle.
Diffstat (limited to 'src/gallium/state_trackers/egl/drm')
-rw-r--r-- | src/gallium/state_trackers/egl/drm/native_drm.c | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/src/gallium/state_trackers/egl/drm/native_drm.c b/src/gallium/state_trackers/egl/drm/native_drm.c index 4814e8f888f..57765cc281f 100644 --- a/src/gallium/state_trackers/egl/drm/native_drm.c +++ b/src/gallium/state_trackers/egl/drm/native_drm.c @@ -138,27 +138,10 @@ drm_display_destroy(struct native_display *ndpy) FREE(drmdpy); } -static struct pipe_resource * -drm_display_import_buffer(struct native_display *ndpy, - const struct pipe_resource *templ, - void *buf) -{ - return ndpy->screen->resource_from_handle(ndpy->screen, - templ, (struct winsys_handle *) buf); -} - -static boolean -drm_display_export_buffer(struct native_display *ndpy, - struct pipe_resource *res, - void *buf) -{ - return ndpy->screen->resource_get_handle(ndpy->screen, - res, (struct winsys_handle *) buf); -} - static struct native_display_buffer drm_display_buffer = { - drm_display_import_buffer, - drm_display_export_buffer + /* use the helpers */ + drm_display_import_native_buffer, + drm_display_export_native_buffer }; static int |