[gtk/wip/chergert/glproto: 75/493] mark some costly things as unlikely




commit f46a5d1a7dc80a8c2c69ac766be3485dbb92a9fa
Author: Christian Hergert <chergert redhat com>
Date:   Mon Dec 28 16:13:23 2020 -0800

    mark some costly things as unlikely
    
    since we dont want to hit those too often anyway

 gsk/next/gskglcommandqueue.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gsk/next/gskglcommandqueue.c b/gsk/next/gskglcommandqueue.c
index b7ae72508b..02b730d46e 100644
--- a/gsk/next/gskglcommandqueue.c
+++ b/gsk/next/gskglcommandqueue.c
@@ -987,7 +987,7 @@ gsk_gl_command_queue_execute (GskGLCommandQueue *self)
               glUseProgram (program);
             }
 
-          if (batch->draw.framebuffer != framebuffer)
+          if G_UNLIKELY (batch->draw.framebuffer != framebuffer)
             {
               framebuffer = batch->draw.framebuffer;
               glBindFramebuffer (GL_FRAMEBUFFER, framebuffer);
@@ -998,7 +998,7 @@ gsk_gl_command_queue_execute (GskGLCommandQueue *self)
                           batch->any.viewport.width,
                           batch->any.viewport.width);
 
-          if (batch->draw.bind_count > 0)
+          if G_UNLIKELY (batch->draw.bind_count > 0)
             {
               for (guint i = 0; i < batch->draw.bind_count; i++)
                 {


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