diff options
Diffstat (limited to 'src/gallium/state_trackers/egl/gdi')
-rw-r--r-- | src/gallium/state_trackers/egl/gdi/native_gdi.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/gallium/state_trackers/egl/gdi/native_gdi.c b/src/gallium/state_trackers/egl/gdi/native_gdi.c index 64f1b1d8f9c..29e89bcae80 100644 --- a/src/gallium/state_trackers/egl/gdi/native_gdi.c +++ b/src/gallium/state_trackers/egl/gdi/native_gdi.c @@ -101,13 +101,13 @@ static boolean gdi_surface_update_buffers(struct native_surface *nsurf, uint buffer_mask) { struct gdi_surface *gsurf = gdi_surface(nsurf); - boolean ret; - gdi_surface_update_geometry(&gsurf->base); - ret = resource_surface_add_resources(gsurf->rsurf, buffer_mask); - gsurf->client_stamp = gsurf->server_stamp; + if (gsurf->client_stamp != gsurf->server_stamp) { + gdi_surface_update_geometry(&gsurf->base); + gsurf->client_stamp = gsurf->server_stamp; + } - return ret; + return resource_surface_add_resources(gsurf->rsurf, buffer_mask); } /** @@ -170,10 +170,8 @@ gdi_surface_validate(struct native_surface *nsurf, uint attachment_mask, struct gdi_surface *gsurf = gdi_surface(nsurf); uint w, h; - if (gsurf->client_stamp != gsurf->server_stamp) { - if (!gdi_surface_update_buffers(&gsurf->base, attachment_mask)) - return FALSE; - } + if (!gdi_surface_update_buffers(&gsurf->base, attachment_mask)) + return FALSE; if (seq_num) *seq_num = gsurf->client_stamp; @@ -233,7 +231,7 @@ gdi_display_create_window_surface(struct native_display *ndpy, } /* initialize the geometry */ - gdi_surface_update_buffers(&gsurf->base, 0x0); + gdi_surface_update_geometry(&gsurf->base); gsurf->base.destroy = gdi_surface_destroy; gsurf->base.swap_buffers = gdi_surface_swap_buffers; |