Commit af0715b
[GStreamer] Leak fixes for GL display, registries and video encoder
https://bugs.webkit.org/show_bug.cgi?id=266964
Reviewed by Carlos Garcia Campos.
The GL display and app contexts were persistent, so never destroyed, thus reported by the leak
tracer. The encoder was also leaking a GstElementFactory so its state is now cleared before
deinitialization. The MSE registry is also now cleaned-up as well.
* Source/WebCore/platform/graphics/PlatformDisplay.h:
* Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp:
(requestGLContext):
* Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp:
(WebCore::registerWebKitGStreamerElements):
(WebCore::registerWebKitGStreamerVideoEncoder):
(WebCore::deinitializeGStreamer):
* Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:
(WebCore::GStreamerRegistryScanner::singletonWasInitialized):
(WebCore::teardownGStreamerRegistryScanner):
(WebCore::GStreamerRegistryScanner::singletonNeedsInitialization): Deleted.
* Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.h:
* Source/WebCore/platform/graphics/gstreamer/PlatformDisplayGStreamer.cpp:
(WebCore::PlatformDisplay::clearGStreamerGLState):
* Source/WebCore/platform/graphics/gstreamer/mse/GStreamerRegistryScannerMSE.cpp:
(WebCore::GStreamerRegistryScannerMSE::singleton):
(WebCore::teardownGStreamerRegistryScannerMSE):
* Source/WebCore/platform/graphics/gstreamer/mse/GStreamerRegistryScannerMSE.h:
* Source/WebCore/platform/gstreamer/VideoEncoderPrivateGStreamer.cpp:
(teardownVideoEncoderSingleton):
* Source/WebCore/platform/gstreamer/VideoEncoderPrivateGStreamer.h:
Canonical link: https://commits.webkit.org/272551@main1 parent b8636c4 commit af0715b
6 files changed
Lines changed: 23 additions & 2 deletions
File tree
- Source/WebCore/platform
- graphics
- gstreamer
- gstreamer
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| 101 | + | |
101 | 102 | | |
102 | 103 | | |
103 | 104 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
| 154 | + | |
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
| 160 | + | |
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| |||
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
461 | 462 | | |
462 | 463 | | |
463 | 464 | | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
464 | 469 | | |
465 | 470 | | |
466 | 471 | | |
| |||
489 | 494 | | |
490 | 495 | | |
491 | 496 | | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
492 | 500 | | |
493 | 501 | | |
494 | 502 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
173 | 178 | | |
174 | 179 | | |
175 | 180 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
0 commit comments