[gtk/wip/chergert/gsk-gl-texture-library: 2/2] gsk/gl: use consistent library naming




commit cbbca38d88dad71327d36693c089ffda6cb80ba4
Author: Christian Hergert <chergert redhat com>
Date:   Fri Mar 18 14:55:13 2022 -0700

    gsk/gl: use consistent library naming

 gsk/gl/gskgldriver.c        | 14 +++++++-------
 gsk/gl/gskgldriverprivate.h |  4 ++--
 gsk/gl/gskglrenderjob.c     | 10 ++++++----
 gsk/gl/gskglshadowlibrary.c |  4 ++--
 4 files changed, 17 insertions(+), 15 deletions(-)
---
diff --git a/gsk/gl/gskgldriver.c b/gsk/gl/gskgldriver.c
index 68311b7238..0390f97702 100644
--- a/gsk/gl/gskgldriver.c
+++ b/gsk/gl/gskgldriver.c
@@ -274,8 +274,8 @@ gsk_gl_driver_dispose (GObject *object)
   g_assert (!self->key_to_texture_id|| g_hash_table_size (self->key_to_texture_id) == 0);
 
   g_clear_object (&self->glyphs_library);
-  g_clear_object (&self->icons);
-  g_clear_object (&self->shadows);
+  g_clear_object (&self->icons_library);
+  g_clear_object (&self->shadows_library);
 
   g_clear_pointer (&self->autorelease_framebuffers, g_array_unref);
   g_clear_pointer (&self->key_to_texture_id, g_hash_table_unref);
@@ -462,8 +462,8 @@ gsk_gl_driver_new (GskGLCommandQueue  *command_queue,
     }
 
   self->glyphs_library = gsk_gl_glyph_library_new (self);
-  self->icons = gsk_gl_icon_library_new (self);
-  self->shadows = gsk_gl_shadow_library_new (self);
+  self->icons_library = gsk_gl_icon_library_new (self);
+  self->shadows_library = gsk_gl_shadow_library_new (self);
 
   gdk_profiler_end_mark (before, "create GskGLDriver", NULL);
 
@@ -554,13 +554,13 @@ gsk_gl_driver_begin_frame (GskGLDriver       *self,
   gsk_gl_command_queue_begin_frame (self->command_queue);
 
   /* Mark unused pixel regions of the atlases */
-  gsk_gl_texture_library_begin_frame (GSK_GL_TEXTURE_LIBRARY (self->icons),
+  gsk_gl_texture_library_begin_frame (GSK_GL_TEXTURE_LIBRARY (self->icons_library),
                                       self->current_frame_id);
   gsk_gl_texture_library_begin_frame (GSK_GL_TEXTURE_LIBRARY (self->glyphs_library),
                                       self->current_frame_id);
 
   /* Cleanup old shadows */
-  gsk_gl_shadow_library_begin_frame (self->shadows);
+  gsk_gl_shadow_library_begin_frame (self->shadows_library);
 
   /* Remove all textures that are from a previous frame or are no
    * longer used by linked GdkTexture. We do this at the beginning
@@ -1158,7 +1158,7 @@ gsk_gl_driver_save_atlases_to_png (GskGLDriver *self,
   g_ptr_array_extend(dst, GSK_GL_TEXTURE_LIBRARY(library)->atlases, NULL, NULL)
   atlases = g_ptr_array_new ();
   copy_atlases (atlases, self->glyphs_library);
-  copy_atlases (atlases, self->icons);
+  copy_atlases (atlases, self->icons_library);
 #undef copy_atlases
 
   for (guint i = 0; i < atlases->len; i++)
diff --git a/gsk/gl/gskgldriverprivate.h b/gsk/gl/gskgldriverprivate.h
index 863240fc3e..accae5b3bb 100644
--- a/gsk/gl/gskgldriverprivate.h
+++ b/gsk/gl/gskgldriverprivate.h
@@ -101,8 +101,8 @@ struct _GskGLDriver
   GskGLCommandQueue *command_queue;
 
   GskGLGlyphLibrary *glyphs_library;
-  GskGLIconLibrary *icons;
-  GskGLShadowLibrary *shadows;
+  GskGLIconLibrary *icons_library;
+  GskGLShadowLibrary *shadows_library;
 
   GArray *texture_pool;
   GHashTable *textures;
diff --git a/gsk/gl/gskglrenderjob.c b/gsk/gl/gskglrenderjob.c
index 3371bab826..30c6cd7a41 100644
--- a/gsk/gl/gskglrenderjob.c
+++ b/gsk/gl/gskglrenderjob.c
@@ -2512,7 +2512,9 @@ gsk_gl_render_job_visit_blurred_outset_shadow_node (GskGLRenderJob      *job,
       scaled_outline.corner[i].height *= scale_y;
     }
 
-  cached_tid = gsk_gl_shadow_library_lookup (job->driver->shadows, &scaled_outline, blur_radius);
+  cached_tid = gsk_gl_shadow_library_lookup (job->driver->shadows_library,
+                                             &scaled_outline,
+                                             blur_radius);
 
   if (cached_tid == 0)
     {
@@ -2574,7 +2576,7 @@ gsk_gl_render_job_visit_blurred_outset_shadow_node (GskGLRenderJob      *job,
                                            blur_radius * scale_x,
                                            blur_radius * scale_y);
 
-      gsk_gl_shadow_library_insert (job->driver->shadows,
+      gsk_gl_shadow_library_insert (job->driver->shadows_library,
                                     &scaled_outline,
                                     blur_radius,
                                     blurred_texture_id);
@@ -3499,14 +3501,14 @@ gsk_gl_render_job_upload_texture (GskGLRenderJob       *job,
                                   GdkTexture           *texture,
                                   GskGLRenderOffscreen *offscreen)
 {
-  if (gsk_gl_texture_library_can_cache ((GskGLTextureLibrary *)job->driver->icons,
+  if (gsk_gl_texture_library_can_cache ((GskGLTextureLibrary *)job->driver->icons_library,
                                         texture->width,
                                         texture->height) &&
       !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_library, texture, &icon_data);
       offscreen->texture_id = GSK_GL_TEXTURE_ATLAS_ENTRY_TEXTURE (icon_data);
       memcpy (&offscreen->area, &icon_data->entry.area, sizeof offscreen->area);
     }
diff --git a/gsk/gl/gskglshadowlibrary.c b/gsk/gl/gskglshadowlibrary.c
index 86e4e5a476..119ba8145b 100644
--- a/gsk/gl/gskglshadowlibrary.c
+++ b/gsk/gl/gskglshadowlibrary.c
@@ -29,9 +29,9 @@
 
 struct _GskGLShadowLibrary
 {
-  GObject        parent_instance;
+  GObject      parent_instance;
   GskGLDriver *driver;
-  GArray        *shadows;
+  GArray      *shadows;
 };
 
 typedef struct _Shadow


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