[gtk/wip/chergert/glproto] short-circuit when offsets match
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/glproto] short-circuit when offsets match
- Date: Fri, 19 Feb 2021 05:08:48 +0000 (UTC)
commit becca3660e1f4624226701119abffb77724ae2b1
Author: Christian Hergert <chergert redhat com>
Date: Thu Feb 18 21:08:42 2021 -0800
short-circuit when offsets match
gsk/next/gskglcommandqueue.c | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/gsk/next/gskglcommandqueue.c b/gsk/next/gskglcommandqueue.c
index b4c953adba..f5677a76ac 100644
--- a/gsk/next/gskglcommandqueue.c
+++ b/gsk/next/gskglcommandqueue.c
@@ -305,6 +305,10 @@ snapshots_equal (GskGLCommandQueue *self,
gconstpointer sdata;
gsize len;
+ /* Short circuit if we'd end up with the same memory */
+ if (fu->info.offset == su->info.offset)
+ continue;
+
if (fu->info.format != su->info.format ||
fu->info.array_count != su->info.array_count)
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]