Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/drm/egl_gbm_backend.cpp
Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Line(s) | 48 | [this] (DrmOutput *output) { | |||
---|---|---|---|---|---|
57 | cleanupOutput(*it); | 57 | cleanupOutput(*it); | ||
58 | m_outputs.erase(it); | 58 | m_outputs.erase(it); | ||
59 | } | 59 | } | ||
60 | ); | 60 | ); | ||
61 | } | 61 | } | ||
62 | 62 | | |||
63 | EglGbmBackend::~EglGbmBackend() | 63 | EglGbmBackend::~EglGbmBackend() | ||
64 | { | 64 | { | ||
65 | // TODO: cleanup front buffer? | | |||
66 | cleanup(); | 65 | cleanup(); | ||
67 | } | 66 | } | ||
68 | 67 | | |||
69 | void EglGbmBackend::cleanupSurfaces() | 68 | void EglGbmBackend::cleanupSurfaces() | ||
70 | { | 69 | { | ||
71 | for (auto it = m_outputs.constBegin(); it != m_outputs.constEnd(); ++it) { | 70 | for (auto it = m_outputs.constBegin(); it != m_outputs.constEnd(); ++it) { | ||
72 | cleanupOutput(*it); | 71 | cleanupOutput(*it); | ||
73 | } | 72 | } | ||
74 | } | 73 | } | ||
75 | 74 | | |||
76 | void EglGbmBackend::cleanupOutput(const Output &o) | 75 | void EglGbmBackend::cleanupOutput(const Output &o) | ||
77 | { | 76 | { | ||
78 | // TODO: cleanup front buffer? | 77 | o.output->cleanup(); | ||
78 | | ||||
79 | if (o.eglSurface != EGL_NO_SURFACE) { | 79 | if (o.eglSurface != EGL_NO_SURFACE) { | ||
80 | eglDestroySurface(eglDisplay(), o.eglSurface); | 80 | eglDestroySurface(eglDisplay(), o.eglSurface); | ||
81 | } | 81 | } | ||
82 | if (o.gbmSurface) { | 82 | if (o.gbmSurface) { | ||
83 | gbm_surface_destroy(o.gbmSurface); | 83 | gbm_surface_destroy(o.gbmSurface); | ||
84 | } | 84 | } | ||
85 | } | 85 | } | ||
86 | 86 | | |||
▲ Show 20 Lines • Show All 262 Lines • Show Last 20 Lines |