1 #ifndef __GSK_GL_ICON_CACHE_PRIVATE_H__
2 #define __GSK_GL_ICON_CACHE_PRIVATE_H__
3 
4 #include "gskgldriverprivate.h"
5 #include "gskglimageprivate.h"
6 #include "gskrendererprivate.h"
7 #include "gskgltextureatlasprivate.h"
8 #include <pango/pango.h>
9 #include <gdk/gdk.h>
10 
11 typedef struct
12 {
13   int ref_count;
14 
15   GdkDisplay *display;
16   GskGLDriver *gl_driver;
17 
18   GskGLTextureAtlases *atlases;
19   GHashTable *icons; /* GdkTexture -> IconData */
20 
21   int timestamp;
22 } GskGLIconCache;
23 
24 typedef struct
25 {
26   float x, y, x2, y2;
27   GskGLTextureAtlas *atlas;
28   guint used     : 1;
29   guint accessed : 1;
30   int texture_id;
31   GdkTexture *source_texture;
32 } IconData;
33 
34 GskGLIconCache * gsk_gl_icon_cache_new            (GdkDisplay *display,
35                                                    GskGLTextureAtlases *atlases);
36 GskGLIconCache * gsk_gl_icon_cache_ref            (GskGLIconCache        *self);
37 void             gsk_gl_icon_cache_unref          (GskGLIconCache        *self);
38 void             gsk_gl_icon_cache_begin_frame    (GskGLIconCache        *self,
39                                                    GPtrArray             *removed_atlases);
40 void             gsk_gl_icon_cache_lookup_or_add  (GskGLIconCache        *self,
41                                                    GdkTexture            *texture,
42                                                    const IconData       **out_icon_data);
43 
44 #endif
45