diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-08-20 22:50:41 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-08-20 22:58:30 -0400 |
commit | e9e373913ee5e5d1380fcd8634afb1b6237ae391 (patch) | |
tree | 84d3a46634d950220662a554ba2fe93e4f5d1a3f /gsk/gl/gskglglyphcacheprivate.h | |
parent | f1f197e3b94a55d5cbfaae2498f991a0ae733b32 (diff) | |
download | gtk+-e9e373913ee5e5d1380fcd8634afb1b6237ae391.tar.gz |
gsk: Drop the gl renderer
ngl supports all the same platforms as gl
now, and has seen more improvements in the
last cycle.
Diffstat (limited to 'gsk/gl/gskglglyphcacheprivate.h')
-rw-r--r-- | gsk/gl/gskglglyphcacheprivate.h | 92 |
1 files changed, 0 insertions, 92 deletions
diff --git a/gsk/gl/gskglglyphcacheprivate.h b/gsk/gl/gskglglyphcacheprivate.h deleted file mode 100644 index d66b251a44..0000000000 --- a/gsk/gl/gskglglyphcacheprivate.h +++ /dev/null @@ -1,92 +0,0 @@ -#ifndef __GSK_GL_GLYPH_CACHE_PRIVATE_H__ -#define __GSK_GL_GLYPH_CACHE_PRIVATE_H__ - -#include "gskgldriverprivate.h" -#include "gskglimageprivate.h" -#include "gskgltextureatlasprivate.h" -#include <pango/pango.h> -#include <gdk/gdk.h> - -typedef struct -{ - int ref_count; - - GdkDisplay *display; - GHashTable *hash_table; - GskGLTextureAtlases *atlases; - - int timestamp; -} GskGLGlyphCache; - -struct _CacheKeyData -{ - PangoFont *font; - PangoGlyph glyph; - guint xshift : 3; - guint yshift : 3; - guint scale : 26; /* times 1024 */ -}; - -typedef struct _CacheKeyData CacheKeyData; - -struct _GlyphCacheKey -{ - CacheKeyData data; - guint hash; -}; - -typedef struct _GlyphCacheKey GlyphCacheKey; - -#define PHASE(x) ((int)(floor (4 * (x + 0.125)) - 4 * floor (x + 0.125))) - -static inline void -glyph_cache_key_set_glyph_and_shift (GlyphCacheKey *key, - PangoGlyph glyph, - float x, - float y) -{ - key->data.glyph = glyph; - key->data.xshift = PHASE (x); - key->data.yshift = PHASE (y); - key->hash = GPOINTER_TO_UINT (key->data.font) ^ - key->data.glyph ^ - (key->data.xshift << 24) ^ - (key->data.yshift << 26) ^ - key->data.scale; -} - -typedef struct _GskGLCachedGlyph GskGLCachedGlyph; - -struct _GskGLCachedGlyph -{ - GskGLTextureAtlas *atlas; - guint texture_id; - - float tx; - float ty; - float tw; - float th; - - int draw_x; - int draw_y; - int draw_width; - int draw_height; - - guint accessed : 1; /* accessed since last check */ - guint used : 1; /* accounted as used in the atlas */ -}; - - -GskGLGlyphCache * gsk_gl_glyph_cache_new (GdkDisplay *display, - GskGLTextureAtlases *atlases); -GskGLGlyphCache * gsk_gl_glyph_cache_ref (GskGLGlyphCache *self); -void gsk_gl_glyph_cache_unref (GskGLGlyphCache *self); -void gsk_gl_glyph_cache_begin_frame (GskGLGlyphCache *self, - GskGLDriver *driver, - GPtrArray *removed_atlases); -void gsk_gl_glyph_cache_lookup_or_add (GskGLGlyphCache *self, - GlyphCacheKey *lookup, - GskGLDriver *driver, - const GskGLCachedGlyph **cached_glyph_out); - -#endif |