Commit 39e5423
committed
Cherry-pick 301043@main (1d16639f9d57). https://bugs.webkit.org/show_bug.cgi?id=300085
[GTK][WPE] OpenGL assets created by WebGL are not released when destroying the WebGLRenderingContext
https://bugs.webkit.org/show_bug.cgi?id=300085
Reviewed by Carlos Garcia Campos.
Stop using a singleton for the ANGLE sharing context. Each ANGLE context will use
its own ANGLE sharing context instead, that will be created and destroyed together
with the ANGLE context. This ensures that all the OpenGL resources that were created
by ANGLE will be destroyed when the contexts are destroyed.
* Source/WebCore/platform/graphics/PlatformDisplay.cpp:
(WebCore::PlatformDisplay::clearGLContexts):
* Source/WebCore/platform/graphics/PlatformDisplay.h:
* Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.h:
* Source/WebCore/platform/graphics/angle/PlatformDisplayANGLE.cpp:
(WebCore::PlatformDisplay::angleSharingGLContext):
(WebCore::PlatformDisplay::clearANGLESharingGLContext): Deleted.
* Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp:
(WebCore::GraphicsContextGLANGLE::~GraphicsContextGLANGLE):
(WebCore::GraphicsContextGLTextureMapperANGLE::platformInitializeContext):
Canonical link: https://commits.webkit.org/301043@main1 parent ac4f27b commit 39e5423
File tree
5 files changed
+17
-30
lines changed- Source/WebCore/platform/graphics
- angle
- texmap
5 files changed
+17
-30
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | 133 | | |
137 | 134 | | |
138 | 135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | 133 | | |
138 | 134 | | |
139 | 135 | | |
140 | 136 | | |
141 | | - | |
142 | 137 | | |
143 | 138 | | |
144 | 139 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
443 | 443 | | |
444 | 444 | | |
445 | 445 | | |
| 446 | + | |
446 | 447 | | |
447 | 448 | | |
448 | 449 | | |
| |||
Lines changed: 2 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | 87 | | |
91 | 88 | | |
92 | 89 | | |
| |||
115 | 112 | | |
116 | 113 | | |
117 | 114 | | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | 115 | | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
| 116 | + | |
135 | 117 | | |
136 | | - | |
| 118 | + | |
137 | 119 | | |
138 | 120 | | |
139 | 121 | | |
| |||
Lines changed: 14 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
112 | 111 | | |
113 | 112 | | |
114 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
115 | 121 | | |
116 | 122 | | |
117 | 123 | | |
| |||
306 | 312 | | |
307 | 313 | | |
308 | 314 | | |
309 | | - | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
310 | 322 | | |
311 | 323 | | |
312 | 324 | | |
| |||
0 commit comments