summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/egl/android
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/android
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/android')
-rw-r--r--src/gallium/state_trackers/egl/android/native_android.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/gallium/state_trackers/egl/android/native_android.cpp b/src/gallium/state_trackers/egl/android/native_android.cpp
index 338427d6925..5f4638a679a 100644
--- a/src/gallium/state_trackers/egl/android/native_android.cpp
+++ b/src/gallium/state_trackers/egl/android/native_android.cpp
@@ -386,24 +386,22 @@ copy_resources(struct native_display *ndpy,
static boolean
android_surface_present(struct native_surface *nsurf,
- enum native_attachment natt,
- boolean preserve,
- uint swap_interval)
+ const native_present_control *ctrl)
{
struct android_surface *asurf = android_surface(nsurf);
struct android_display *adpy = asurf->adpy;
boolean ret;
- if (swap_interval || natt != NATIVE_ATTACHMENT_BACK_LEFT)
+ if (ctrl->swap_interval || ctrl->natt != NATIVE_ATTACHMENT_BACK_LEFT)
return FALSE;
/* we always render to color_res first when it exists */
if (asurf->color_res) {
copy_resources(&adpy->base, asurf->color_res, asurf->buf_res);
- if (!preserve)
+ if (!ctrl->preserve)
pipe_resource_reference(&asurf->color_res, NULL);
}
- else if (preserve) {
+ else if (ctrl->preserve) {
struct pipe_resource templ;
memset(&templ, 0, sizeof(templ));