2019-05-22 07:33:25 +00:00
|
|
|
#ifndef __GSK_GL_ICON_CACHE_PRIVATE_H__
|
|
|
|
#define __GSK_GL_ICON_CACHE_PRIVATE_H__
|
|
|
|
|
|
|
|
#include "gskgldriverprivate.h"
|
|
|
|
#include "gskglimageprivate.h"
|
|
|
|
#include "gskrendererprivate.h"
|
|
|
|
#include "gskgltextureatlasprivate.h"
|
|
|
|
#include <pango/pango.h>
|
|
|
|
#include <gdk/gdk.h>
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2019-06-04 21:27:09 +00:00
|
|
|
int ref_count;
|
|
|
|
|
|
|
|
GdkDisplay *display;
|
2019-05-22 07:33:25 +00:00
|
|
|
GskGLDriver *gl_driver;
|
|
|
|
|
2019-06-04 21:27:09 +00:00
|
|
|
GskGLTextureAtlases *atlases;
|
2019-05-22 07:33:25 +00:00
|
|
|
GHashTable *icons; /* GdkTexture -> IconData */
|
|
|
|
|
2019-10-12 15:46:10 +00:00
|
|
|
int timestamp;
|
2019-05-22 07:33:25 +00:00
|
|
|
} GskGLIconCache;
|
|
|
|
|
2019-10-15 11:51:05 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
float x, y, x2, y2;
|
|
|
|
GskGLTextureAtlas *atlas;
|
|
|
|
guint used : 1;
|
|
|
|
guint accessed : 1;
|
|
|
|
int texture_id;
|
|
|
|
GdkTexture *source_texture;
|
|
|
|
} IconData;
|
|
|
|
|
2019-06-04 21:27:09 +00:00
|
|
|
GskGLIconCache * gsk_gl_icon_cache_new (GdkDisplay *display,
|
|
|
|
GskGLTextureAtlases *atlases);
|
|
|
|
GskGLIconCache * gsk_gl_icon_cache_ref (GskGLIconCache *self);
|
|
|
|
void gsk_gl_icon_cache_unref (GskGLIconCache *self);
|
2019-10-12 00:42:24 +00:00
|
|
|
void gsk_gl_icon_cache_begin_frame (GskGLIconCache *self,
|
|
|
|
GPtrArray *removed_atlases);
|
2019-05-22 07:33:25 +00:00
|
|
|
void gsk_gl_icon_cache_lookup_or_add (GskGLIconCache *self,
|
|
|
|
GdkTexture *texture,
|
2019-10-15 11:51:05 +00:00
|
|
|
const IconData **out_icon_data);
|
2019-05-22 07:33:25 +00:00
|
|
|
|
|
|
|
#endif
|