[gtk/wip/chergert/glproto: 431/493] presize arrays
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/glproto: 431/493] presize arrays
- Date: Fri, 19 Feb 2021 02:25:22 +0000 (UTC)
commit 6f22acc0aca4080a5ea4f1437e79c571bc895cd6
Author: Christian Hergert <chergert redhat com>
Date: Tue Feb 9 16:57:12 2021 -0800
presize arrays
these don't really ever go past a half-dozen really
gsk/next/gskglrenderjob.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gsk/next/gskglrenderjob.c b/gsk/next/gskglrenderjob.c
index 969a74c0ed..33c219f62a 100644
--- a/gsk/next/gskglrenderjob.c
+++ b/gsk/next/gskglrenderjob.c
@@ -3685,8 +3685,8 @@ gsk_gl_render_job_new (GskNextDriver *driver,
job = g_slice_new0 (GskGLRenderJob);
job->driver = g_object_ref (driver);
job->command_queue = job->driver->command_queue;
- job->clip = g_array_new (FALSE, FALSE, sizeof (GskGLRenderClip));
- job->modelview = g_array_new (FALSE, FALSE, sizeof (GskGLRenderModelview));
+ job->clip = g_array_sized_new (FALSE, FALSE, sizeof (GskGLRenderClip), 16);
+ job->modelview = g_array_sized_new (FALSE, FALSE, sizeof (GskGLRenderModelview), 16);
job->framebuffer = framebuffer;
job->offset_x = 0;
job->offset_y = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]