st/omx: use the vl_screen dispatch
authorEmil Velikov <emil.l.velikov@gmail.com>
Fri, 6 Nov 2015 22:45:38 +0000 (22:45 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 20 Nov 2015 10:58:44 +0000 (10:58 +0000)
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
src/gallium/state_trackers/omx/entrypoint.c

index dd72b296de2f9e8299cf63cd87aad2ca6e872597..da9ca104d93005ebe245cafbe16c3191bfd93767 100644 (file)
@@ -119,14 +119,13 @@ void omx_put_screen(void)
 {
    pipe_mutex_lock(omx_lock);
    if ((--omx_usecount) == 0) {
-      if (omx_render_node) {
-         vl_drm_screen_destroy(omx_screen);
+      omx_screen->destroy(omx_screen);
+      omx_screen = NULL;
+
+      if (omx_render_node)
          close(drm_fd);
-      } else {
-         vl_screen_destroy(omx_screen);
+      else
          XCloseDisplay(omx_display);
-      }
-      omx_screen = NULL;
    }
    pipe_mutex_unlock(omx_lock);
 }