[gtk/backports-for-4-4: 7/19] ngl: Avoid a coordinate overflow
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/backports-for-4-4: 7/19] ngl: Avoid a coordinate overflow
- Date: Thu, 2 Sep 2021 23:11:43 +0000 (UTC)
commit cb82990a8281458a7fbcecb114689146c9cc5c40
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Aug 28 15:42:30 2021 -0400
ngl: Avoid a coordinate overflow
This was showing up as big text selections going
missing sporadically.
Fixes: #4214
gsk/ngl/gsknglrenderjob.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gsk/ngl/gsknglrenderjob.c b/gsk/ngl/gsknglrenderjob.c
index 532157d1be..ef4d075997 100644
--- a/gsk/ngl/gsknglrenderjob.c
+++ b/gsk/ngl/gsknglrenderjob.c
@@ -1408,7 +1408,10 @@ gsk_ngl_render_job_visit_color_node (GskNglRenderJob *job,
program = CHOOSE_PROGRAM (job, coloring);
batch = gsk_ngl_command_queue_get_batch (job->command_queue);
- if (batch->any.kind == GSK_NGL_COMMAND_KIND_DRAW &&
+ /* Limit the size, or we end up with a coordinate overflow somwhere. */
+ if (node->bounds.size.width < 300 &&
+ node->bounds.size.height < 300 &&
+ batch->any.kind == GSK_NGL_COMMAND_KIND_DRAW &&
batch->any.program == program->id)
{
GskNglRenderOffscreen offscreen = {0};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]