[gtk] gl renderer: Don't add clip ops if the clip didn't change



commit e14fe222e8aa5b216ae2bc26e5dfebefaae17876
Author: Timm Bäder <mail baedert org>
Date:   Thu Jan 17 08:22:00 2019 +0100

    gl renderer: Don't add clip ops if the clip didn't change

 gsk/gl/gskglrenderops.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/gsk/gl/gskglrenderops.c b/gsk/gl/gskglrenderops.c
index 86b44e06e2..9fbc9ec405 100644
--- a/gsk/gl/gskglrenderops.c
+++ b/gsk/gl/gskglrenderops.c
@@ -233,6 +233,10 @@ ops_set_clip (RenderOpBuilder      *builder,
 {
   RenderOp *last_op;
 
+  if (builder->current_program_state &&
+      memcmp (&builder->current_program_state->clip, clip,sizeof (GskRoundedRect)) == 0)
+    return;
+
   if (builder->render_ops->len > 0)
     {
       last_op = &g_array_index (builder->render_ops, RenderOp, builder->render_ops->len - 1);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]