mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	render/gles2: don't unset the current EGL surface when destroying texture
When a texture is destroyed between wlr_egl_make_current and wlr_egl_swap_buffers, it resets the current EGL surface to NULL. This makes wlr_egl_swap_buffers fail. If the EGL context is already current, there's no need to reset it.
This commit is contained in:
		
							parent
							
								
									5bddb5a909
								
							
						
					
					
						commit
						6bb7639a0f
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
					@ -115,7 +115,9 @@ static void gles2_texture_destroy(struct wlr_texture *wlr_texture) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	struct wlr_gles2_texture *texture = gles2_get_texture(wlr_texture);
 | 
						struct wlr_gles2_texture *texture = gles2_get_texture(wlr_texture);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (!wlr_egl_is_current(texture->egl)) {
 | 
				
			||||||
		wlr_egl_make_current(texture->egl, EGL_NO_SURFACE, NULL);
 | 
							wlr_egl_make_current(texture->egl, EGL_NO_SURFACE, NULL);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	PUSH_GLES2_DEBUG;
 | 
						PUSH_GLES2_DEBUG;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue