diff options
author | Chia-I Wu <olv@lunarg.com> | 2010-03-05 11:00:15 +0800 |
---|---|---|
committer | Chia-I Wu <olv@lunarg.com> | 2010-03-05 11:32:29 +0800 |
commit | fade8a6eb639d633cfdbba4a3ba3aa3cc5c04fa6 (patch) | |
tree | e856f498737a728917b31901fa43f21ed065a96f /src/gallium/state_trackers/egl/x11/native_ximage.c | |
parent | 89a75b763467d83d4d402c91db55548682be14f0 (diff) |
st/egl: Add get_param to native display interface.
get_param can be used to query the parameters of a native display.
There is only NATIVE_PARAM_USE_NATIVE_BUFFER right now. It queries
whether the window/pixmap surfaces use the native buffers instead of
private buffers.
Diffstat (limited to 'src/gallium/state_trackers/egl/x11/native_ximage.c')
-rw-r--r-- | src/gallium/state_trackers/egl/x11/native_ximage.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/egl/x11/native_ximage.c b/src/gallium/state_trackers/egl/x11/native_ximage.c index 5e0270c296..3421c1951a 100644 --- a/src/gallium/state_trackers/egl/x11/native_ximage.c +++ b/src/gallium/state_trackers/egl/x11/native_ximage.c @@ -699,6 +699,25 @@ ximage_display_is_pixmap_supported(struct native_display *ndpy, return (fmt == nconf->color_format); } +static int +ximage_display_get_param(struct native_display *ndpy, + enum native_param_type param) +{ + int val; + + switch (param) { + case NATIVE_PARAM_USE_NATIVE_BUFFER: + /* private buffers are allocated */ + val = FALSE; + break; + default: + val = 0; + break; + } + + return val; +} + static void ximage_display_destroy(struct native_display *ndpy) { @@ -753,6 +772,7 @@ x11_create_ximage_display(EGLNativeDisplayType dpy, xdpy->base.screen = softpipe_create_screen(xdpy->winsys); xdpy->base.destroy = ximage_display_destroy; + xdpy->base.get_param = ximage_display_get_param; xdpy->base.get_configs = ximage_display_get_configs; xdpy->base.is_pixmap_supported = ximage_display_is_pixmap_supported; |