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/wayland | |
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/wayland')
-rw-r--r-- | src/gallium/state_trackers/egl/wayland/native_drm.c | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/src/gallium/state_trackers/egl/wayland/native_drm.c b/src/gallium/state_trackers/egl/wayland/native_drm.c index a9fd30319eb..8317022ce65 100644 --- a/src/gallium/state_trackers/egl/wayland/native_drm.c +++ b/src/gallium/state_trackers/egl/wayland/native_drm.c @@ -212,27 +212,10 @@ wayland_drm_display_init_screen(struct native_display *ndpy) return TRUE; } -static struct pipe_resource * -wayland_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 -wayland_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 wayland_drm_display_buffer = { - wayland_drm_display_import_buffer, - wayland_drm_display_export_buffer + /* use the helpers */ + drm_display_import_native_buffer, + drm_display_export_native_buffer }; static int |