diff options
author | Brian Paul <[email protected]> | 2010-03-17 10:31:57 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2010-03-17 10:31:59 -0600 |
commit | c11d582411a999ed40db4c02143dd380113e0ffd (patch) | |
tree | 91fa0eafcf6fcb26a6ada94af62a502bfa9f9a4c /src/mesa/state_tracker/st_cb_fbo.c | |
parent | a196a5d3303a49c5f79a283f91f8e0cc8aa87f69 (diff) |
st/mesa: plug in default for pipe_context::surface_copy() if needed
This lets us avoid conditionals and duplicated code in several places.
Diffstat (limited to 'src/mesa/state_tracker/st_cb_fbo.c')
-rw-r--r-- | src/mesa/state_tracker/st_cb_fbo.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c index 4ccba1db85d..84c2474038d 100644 --- a/src/mesa/state_tracker/st_cb_fbo.c +++ b/src/mesa/state_tracker/st_cb_fbo.c @@ -51,7 +51,6 @@ #include "st_manager.h" #include "util/u_format.h" -#include "util/u_rect.h" #include "util/u_inlines.h" @@ -518,17 +517,10 @@ copy_back_to_front(struct st_context *st, (void) st_get_framebuffer_surface(stfb, backIndex, &surf_back); if (surf_front && surf_back) { - if (st->pipe->surface_copy) { - st->pipe->surface_copy(st->pipe, - surf_front, 0, 0, /* dest */ - surf_back, 0, 0, /* src */ - fb->Width, fb->Height); - } else { - util_surface_copy(st->pipe, FALSE, - surf_front, 0, 0, - surf_back, 0, 0, - fb->Width, fb->Height); - } + st->pipe->surface_copy(st->pipe, + surf_front, 0, 0, /* dest */ + surf_back, 0, 0, /* src */ + fb->Width, fb->Height); } } |