diff options
author | Chia-I Wu <olv@lunarg.com> | 2010-02-21 10:58:22 +0800 |
---|---|---|
committer | Chia-I Wu <olv@lunarg.com> | 2010-03-05 10:19:05 +0800 |
commit | e38f28ddedd6d4902ae18b1bf243e67d4b16decb (patch) | |
tree | 30237b21b483746ecf2263c16ed380062e1fae53 /src/gallium/state_trackers/egl/common/native.h | |
parent | 45df4bad9fc0379f05197bee10c03fd351f24094 (diff) |
st/egl: Add event support to the native display interface.
There is only invalid_surface event right now. When EGL receives the
event, it sets the force_validate flag of the context binding to the
surface. This helps skip an unnecessary check.
Diffstat (limited to 'src/gallium/state_trackers/egl/common/native.h')
-rw-r--r-- | src/gallium/state_trackers/egl/common/native.h | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/egl/common/native.h b/src/gallium/state_trackers/egl/common/native.h index 4f9758545a..1bf2804db5 100644 --- a/src/gallium/state_trackers/egl/common/native.h +++ b/src/gallium/state_trackers/egl/common/native.h @@ -69,6 +69,11 @@ struct native_probe { }; struct native_surface { + /** + * Available for caller's use. + */ + void *user_data; + void (*destroy)(struct native_surface *nsurf); /** @@ -143,6 +148,11 @@ struct native_display { */ struct pipe_screen *screen; + /** + * Available for caller's use. + */ + void *user_data; + void (*destroy)(struct native_display *ndpy); /** @@ -239,6 +249,20 @@ struct native_display_modeset { }; /** + * The handler for events that a native display may generate. The events are + * generated asynchronously and the handler may be called by any thread at any + * time. + */ +struct native_event_handler { + /** + * This function is called when a surface needs to be validated. + */ + void (*invalid_surface)(struct native_display *ndpy, + struct native_surface *nsurf, + unsigned int seq_num); +}; + +/** * Test whether an attachment is set in the mask. */ static INLINE boolean @@ -267,6 +291,7 @@ const char * native_get_name(void); struct native_display * -native_create_display(EGLNativeDisplayType dpy); +native_create_display(EGLNativeDisplayType dpy, + struct native_event_handler *handler); #endif /* _NATIVE_H_ */ |