[gegl] buffer: add branch hints in gegl-tile-backend-buffer



commit 1381eb0b85666c001c1fd1e4b05cb80748a079b0
Author: Øyvind Kolås <pippin gimp org>
Date:   Sat Jul 31 22:47:56 2021 +0200

    buffer: add branch hints in gegl-tile-backend-buffer

 gegl/buffer/gegl-tile-backend-buffer.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gegl/buffer/gegl-tile-backend-buffer.c b/gegl/buffer/gegl-tile-backend-buffer.c
index 15bd8df65..5c6cef953 100644
--- a/gegl/buffer/gegl-tile-backend-buffer.c
+++ b/gegl/buffer/gegl-tile-backend-buffer.c
@@ -176,7 +176,7 @@ gegl_tile_backend_buffer_command (GeglTileSource  *tile_source,
 {
   GeglTileBackendBuffer *tile_backend_buffer = GEGL_TILE_BACKEND_BUFFER (tile_source);
 
-  if (! tile_backend_buffer->buffer)
+  if (G_UNLIKELY(! tile_backend_buffer->buffer))
     return NULL;
 
   switch (command)
@@ -234,7 +234,7 @@ gegl_tile_backend_buffer_get_tile (GeglTileBackendBuffer *tile_backend_buffer,
 
   src_tile = gegl_buffer_get_tile (buffer, x, y, z);
 
-  if (src_tile)
+  if (G_LIKELY(src_tile))
     {
       tile = gegl_tile_dup (src_tile);
 
@@ -289,7 +289,7 @@ gegl_tile_backend_buffer_forward_command (GeglTileBackendBuffer *tile_backend_bu
 
   g_rec_mutex_unlock (&buffer->tile_storage->mutex);
 
-  if (emit_changed_signal)
+  if (G_UNLIKELY (emit_changed_signal))
     gegl_tile_backend_buffer_emit_changed_signal (tile_backend_buffer, x, y, z);
 
   return result;


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