Repository navigation
Commit 45f4e3d
authored
[Linux] Don't clear the OpenGL context when a frame has been drawn (flutter#192137)
The draw handler made a context current to draw the frame with, then
cleared it, leaving no context current at all while GTK finished the
frame.
GTK makes the context it needs current before using OpenGL, so this
doesn't need to be cleared. But GTK doesn't check that making its
context current succeeded, and if it fails it carries on and uses OpenGL
with no context current, which crashes.
Leaving the context current means GTK still has one to fall back on when
this happens, so it doesn't crash.
See flutter#1917751 parent 6dbf67f commit 45f4e3d
1 file changed
Lines changed: 9 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
165 | 174 | | |
166 | 175 | | |
167 | 176 | | |
| |||
174 | 183 | | |
175 | 184 | | |
176 | 185 | | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | 186 | | |
182 | 187 | | |
183 | 188 | | |
| |||
0 commit comments