[gtk/wip/chergert/glproto: 480/526] remove check from very hot path




commit 860b1aec7378b2035dc90f7c81e89fb4f706b388
Author: Christian Hergert <chergert redhat com>
Date:   Mon Feb 8 15:04:17 2021 -0800

    remove check from very hot path

 gsk/next/gskglprogramprivate.h | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
---
diff --git a/gsk/next/gskglprogramprivate.h b/gsk/next/gskglprogramprivate.h
index b958abf1e6..7e25d7473a 100644
--- a/gsk/next/gskglprogramprivate.h
+++ b/gsk/next/gskglprogramprivate.h
@@ -87,10 +87,7 @@ static inline int
 gsk_gl_program_get_uniform_location (GskGLProgram *self,
                                      guint         key)
 {
-  if G_LIKELY (key < self->uniform_locations->len)
-    return g_array_index (self->uniform_locations, GLint, key);
-  else
-    return -1;
+  return g_array_index (self->uniform_locations, GLint, key);
 }
 
 static inline void


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