mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-08 05:38:02 +02:00
gl: Flush context upon evicting a gradient
As the random selection of a gradient can possible destroy the currently active gradient, we need to flush the context in order to flush any references to the texture before deletion.
This commit is contained in:
parent
a0fb139131
commit
9f43f096b2
1 changed files with 2 additions and 0 deletions
|
|
@ -328,6 +328,8 @@ _cairo_gl_gradient_destroy (cairo_gl_gradient_t *gradient)
|
|||
return;
|
||||
|
||||
if (_cairo_gl_context_acquire (gradient->device, &ctx) == CAIRO_STATUS_SUCCESS) {
|
||||
/* The gradient my still be active in the last operation, so flush */
|
||||
_cairo_gl_composite_flush (ctx);
|
||||
glDeleteTextures (1, &gradient->tex);
|
||||
ignore = _cairo_gl_context_release (ctx, CAIRO_STATUS_SUCCESS);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue