summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/egl/fbdev
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2011-09-02 21:26:24 +0800
committerChia-I Wu <[email protected]>2011-09-08 11:16:11 +0800
commit08e1076fd2d3f6fb879dd2529e7d035d6a399da2 (patch)
treeaeec3914333754dc2745c4f747a3a6bc69f4a1e0 /src/gallium/state_trackers/egl/fbdev
parentc0470bf77a038fd45441d1e55e6c89100996ff4b (diff)
st/egl: add native_present_control
Replace the parameters of native_surface::present by a struct, native_present_control. Using a struct allows us to add more control options without having to update each backend every time.
Diffstat (limited to 'src/gallium/state_trackers/egl/fbdev')
-rw-r--r--src/gallium/state_trackers/egl/fbdev/native_fbdev.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/gallium/state_trackers/egl/fbdev/native_fbdev.c b/src/gallium/state_trackers/egl/fbdev/native_fbdev.c
index 6772d379f73..e126888df90 100644
--- a/src/gallium/state_trackers/egl/fbdev/native_fbdev.c
+++ b/src/gallium/state_trackers/egl/fbdev/native_fbdev.c
@@ -183,17 +183,15 @@ fbdev_surface_update_drawable(struct native_surface *nsurf,
static boolean
fbdev_surface_present(struct native_surface *nsurf,
- enum native_attachment natt,
- boolean preserve,
- uint swap_interval)
+ const struct native_present_control *ctrl)
{
struct fbdev_surface *fbsurf = fbdev_surface(nsurf);
struct fbdev_display *fbdpy = fbsurf->fbdpy;
boolean ret = FALSE;
- if (swap_interval)
+ if (ctrl->swap_interval)
return FALSE;
- if (natt != NATIVE_ATTACHMENT_BACK_LEFT)
+ if (ctrl->natt != NATIVE_ATTACHMENT_BACK_LEFT)
return FALSE;
if (!fbdpy->assume_fixed_vinfo) {
@@ -206,7 +204,7 @@ fbdev_surface_present(struct native_surface *nsurf,
/* present the surface */
if (fbdev_surface_update_drawable(&fbsurf->base, &vinfo)) {
ret = resource_surface_present(fbsurf->rsurf,
- natt, (void *) &fbsurf->drawable);
+ ctrl->natt, (void *) &fbsurf->drawable);
}
fbsurf->width = vinfo.xres;
@@ -223,7 +221,7 @@ fbdev_surface_present(struct native_surface *nsurf,
else {
/* the drawable never changes */
ret = resource_surface_present(fbsurf->rsurf,
- natt, (void *) &fbsurf->drawable);
+ ctrl->natt, (void *) &fbsurf->drawable);
}
return ret;