]> git.sesse.net Git - nageru/blob - shared/va_display.cpp
Move VADisplayWithCleanup into its own header file, in shared/.
[nageru] / shared / va_display.cpp
1 #include "shared/va_display.h"
2 #include <unistd.h>
3
4 VADisplayWithCleanup::~VADisplayWithCleanup()
5 {
6         if (va_dpy != nullptr) {
7                 vaTerminate(va_dpy);
8         }
9         if (x11_display != nullptr) {
10                 XCloseDisplay(x11_display);
11         }
12         if (drm_fd != -1) {
13                 close(drm_fd);
14         }
15 }
16