[gtk] gl: short-circuit on NULL program



commit c9ca60c201216e0a7bf933a0cbb5225cab38fa87
Author: Christian Hergert <chergert redhat com>
Date:   Wed Oct 9 11:51:32 2019 -0700

    gl: short-circuit on NULL program
    
    The NULL check is a more inclusive check than each of the individual
    op->op checks.

 gsk/gl/gskglrenderer.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c
index a388817973..25b4c9b420 100644
--- a/gsk/gl/gskglrenderer.c
+++ b/gsk/gl/gskglrenderer.c
@@ -3045,12 +3045,12 @@ gsk_gl_renderer_render_ops (GskGLRenderer *self,
           op->op == OP_CHANGE_VAO)
         continue;
 
-      if (op->op != OP_PUSH_DEBUG_GROUP &&
+      if (program == NULL &&
+          op->op != OP_PUSH_DEBUG_GROUP &&
           op->op != OP_POP_DEBUG_GROUP &&
           op->op != OP_CHANGE_PROGRAM &&
           op->op != OP_CHANGE_RENDER_TARGET &&
-          op->op != OP_CLEAR &&
-          program == NULL)
+          op->op != OP_CLEAR)
         continue;
 
       OP_PRINT ("Op %u: %u", i, op->op);


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