mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 01:48:07 +02:00
gl: GL_UNPACK_ROW_LENGTH does not accept negative values
Use the slow fallback path if passed an image with a negative stride. Fixes negative-stride-image.
This commit is contained in:
parent
60549f7a56
commit
2121887030
1 changed files with 4 additions and 3 deletions
|
|
@ -845,9 +845,10 @@ _cairo_gl_surface_draw_image (cairo_gl_surface_t *dst,
|
|||
* b. the row stride cannot be handled by GL itself using a 4 byte
|
||||
* alignment constraint
|
||||
*/
|
||||
if (ctx->gl_flavor == CAIRO_GL_FLAVOR_ES &&
|
||||
(src->width * cpp < src->stride - 3 ||
|
||||
width != src->width))
|
||||
if (src->stride < 0 ||
|
||||
(ctx->gl_flavor == CAIRO_GL_FLAVOR_ES &&
|
||||
(src->width * cpp < src->stride - 3 ||
|
||||
width != src->width)))
|
||||
{
|
||||
glPixelStorei (GL_UNPACK_ALIGNMENT, 1);
|
||||
status = _cairo_gl_surface_extract_image_data (src, src_x, src_y,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue