gint64 frame_id,
GPtrArray *removed_atlases)
{
- GskNglGlyphLibrary *self = GSK_NGL_GLYPH_LIBRARY (library);
+ GskNglGlyphLibrary *self = (GskNglGlyphLibrary *)library;
memset (self->front, 0, sizeof self->front);
}
static void
gsk_ngl_glyph_library_init (GskNglGlyphLibrary *self)
{
- GSK_NGL_TEXTURE_LIBRARY (self)->max_entry_size = MAX_GLYPH_SIZE;
- gsk_ngl_texture_library_set_funcs (GSK_NGL_TEXTURE_LIBRARY (self),
+ GskNglTextureLibrary *tl = (GskNglTextureLibrary *)self;
+
+ tl->max_entry_size = MAX_GLYPH_SIZE;
+ gsk_ngl_texture_library_set_funcs (tl,
gsk_ngl_glyph_key_hash,
gsk_ngl_glyph_key_equal,
gsk_ngl_glyph_key_free,
int height,
double device_scale)
{
+ GskNglTextureLibrary *tl = (GskNglTextureLibrary *)self;
G_GNUC_UNUSED gint64 start_time = GDK_PROFILER_CURRENT_TIME;
cairo_scaled_font_t *scaled_font;
cairo_surface_t *surface;
gdk_gl_context_pop_debug_group (gdk_gl_context_get_current ());
- GSK_NGL_TEXTURE_LIBRARY (self)->driver->command_queue->n_uploads++;
+ tl->driver->command_queue->n_uploads++;
if (gdk_profiler_is_running ())
{
GskNglGlyphKey *key,
const GskNglGlyphValue **out_value)
{
+ GskNglTextureLibrary *tl = (GskNglTextureLibrary *)self;
PangoRectangle ink_rect;
GskNglGlyphValue *value;
int width;
width = (int) ceil (ink_rect.width * key->scale / 1024.0);
height = (int) ceil (ink_rect.height * key->scale / 1024.0);
- value = gsk_ngl_texture_library_pack (GSK_NGL_TEXTURE_LIBRARY (self),
+ value = gsk_ngl_texture_library_pack (tl,
key,
sizeof *value,
width,
static void
gsk_ngl_icon_library_init (GskNglIconLibrary *self)
{
- GSK_NGL_TEXTURE_LIBRARY (self)->max_entry_size = 128;
- gsk_ngl_texture_library_set_funcs (GSK_NGL_TEXTURE_LIBRARY (self),
+ GskNglTextureLibrary *tl = (GskNglTextureLibrary *)self;
+
+ tl->max_entry_size = 128;
+ gsk_ngl_texture_library_set_funcs (tl,
NULL, NULL, NULL,
gsk_ngl_icon_data_free);
}
GdkTexture *key,
const GskNglIconData **out_value)
{
+ GskNglTextureLibrary *tl = (GskNglTextureLibrary *)self;
G_GNUC_UNUSED gint64 start_time = GDK_PROFILER_CURRENT_TIME;
cairo_surface_t *surface;
GskNglIconData *icon_data;
width = key->width;
height = key->height;
- icon_data = gsk_ngl_texture_library_pack (GSK_NGL_TEXTURE_LIBRARY (self),
+ icon_data = gsk_ngl_texture_library_pack (tl,
key,
sizeof (GskNglIconData),
width, height, 1,
cairo_surface_destroy (surface);
g_free (free_data);
- GSK_NGL_TEXTURE_LIBRARY (self)->driver->command_queue->n_uploads++;
+ tl->driver->command_queue->n_uploads++;
if (gdk_profiler_is_running ())
{
GdkTexture *texture,
GskNglRenderOffscreen *offscreen)
{
- if (gsk_ngl_texture_library_can_cache (GSK_NGL_TEXTURE_LIBRARY (job->driver->icons),
+ if (gsk_ngl_texture_library_can_cache ((GskNglTextureLibrary *)job->driver->icons,
texture->width,
texture->height) &&
!GDK_IS_GL_TEXTURE (texture))