diff options
author | Marek Olšák <[email protected]> | 2016-10-20 22:57:03 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-10-26 13:02:58 +0200 |
commit | 81a95946dab730c1cfcf04ac1373cea5f7908f65 (patch) | |
tree | f2bffccf7708d25b7f8c01a6fa634a588d2e52ef /src/gallium/winsys/radeon | |
parent | dc6bbe2dd0eb9ba421c8454b3b6179a6b0452b40 (diff) |
gallium/radeon: fold radeon_winsys::surface_best into radeon/winsys
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/winsys/radeon')
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_drm_surface.c | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_surface.c b/src/gallium/winsys/radeon/drm/radeon_drm_surface.c index 0399e5a3680..8a88ee55490 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_surface.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_surface.c @@ -186,24 +186,13 @@ static int radeon_winsys_surface_init(struct radeon_winsys *rws, surf_winsys_to_drm(&surf_drm, surf_ws); - r = radeon_surface_init(ws->surf_man, &surf_drm); - if (r) - return r; - - surf_drm_to_winsys(ws, surf_ws, &surf_drm); - return 0; -} - -static int radeon_winsys_surface_best(struct radeon_winsys *rws, - struct radeon_surf *surf_ws) -{ - struct radeon_drm_winsys *ws = (struct radeon_drm_winsys*)rws; - struct radeon_surface surf_drm; - int r; - - surf_winsys_to_drm(&surf_drm, surf_ws); + if (!(surf_ws->flags & RADEON_SURF_IMPORTED)) { + r = radeon_surface_best(ws->surf_man, &surf_drm); + if (r) + return r; + } - r = radeon_surface_best(ws->surf_man, &surf_drm); + r = radeon_surface_init(ws->surf_man, &surf_drm); if (r) return r; @@ -214,5 +203,4 @@ static int radeon_winsys_surface_best(struct radeon_winsys *rws, void radeon_surface_init_functions(struct radeon_drm_winsys *ws) { ws->base.surface_init = radeon_winsys_surface_init; - ws->base.surface_best = radeon_winsys_surface_best; } |