[gtk/wip/chergert/glproto: 221/493] use glyph cache for small textures




commit b30f37505c49fe561b87253589474ad3a93c17c8
Author: Christian Hergert <chergert redhat com>
Date:   Wed Jan 20 19:37:51 2021 -0800

    use glyph cache for small textures

 gsk/next/gskglrenderjob.c | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)
---
diff --git a/gsk/next/gskglrenderjob.c b/gsk/next/gskglrenderjob.c
index aee61406d8..21ce9f30ed 100644
--- a/gsk/next/gskglrenderjob.c
+++ b/gsk/next/gskglrenderjob.c
@@ -3016,9 +3016,8 @@ gsk_gl_render_job_upload_texture (GskGLRenderJob       *job,
       !GDK_IS_GL_TEXTURE (texture))
     {
       const GskGLIconData *icon_data;
-      gsk_gl_icon_library_lookup_or_add (job->driver->icons,
-                                         texture,
-                                         &icon_data);
+
+      gsk_gl_icon_library_lookup_or_add (job->driver->icons, texture, &icon_data);
       offscreen->texture_id = GSK_GL_TEXTURE_ATLAS_ENTRY_TEXTURE (icon_data);
       offscreen->area = icon_data->entry.area;
     }
@@ -3323,14 +3322,8 @@ gsk_gl_render_job_visit_node_with_offscreen (GskGLRenderJob       *job,
       offscreen->force_offscreen == FALSE)
     {
       GdkTexture *texture = gsk_texture_node_get_texture (node);
-
-      init_full_texture_region (&offscreen->area);
-      offscreen->was_offscreen = FALSE;
-      offscreen->texture_id = gsk_next_driver_load_texture (job->driver,
-                                                            texture,
-                                                            GL_LINEAR,
-                                                            GL_LINEAR);
-
+      gsk_gl_render_job_upload_texture (job, texture, offscreen);
+      g_assert (offscreen->was_offscreen == FALSE);
       return TRUE;
     }
 


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