Files
gtk/gsk/gl/gskglpathcacheprivate.h
Matthias Clasen a03a821840 gl: Render fill/stroke nodes using the mask shader
Convert the path to an alpha mask and upload that
as a texture to use with the mask shader. We use
the path cache to reuse masks for the same path.
2020-12-22 23:51:11 -05:00

36 lines
1.6 KiB
C

#ifndef __GSK_GL_PATH_CACHE_H__
#define __GSK_GL_PATH_CACHE_H__
#include <glib.h>
#include "gskgldriverprivate.h"
#include "gskpath.h"
typedef struct
{
GHashTable *textures;
} GskGLPathCache;
void gsk_gl_path_cache_init (GskGLPathCache *self);
void gsk_gl_path_cache_free (GskGLPathCache *self,
GskGLDriver *gl_driver);
void gsk_gl_path_cache_begin_frame (GskGLPathCache *self,
GskGLDriver *gl_driver);
int gsk_gl_path_cache_get_texture_id (GskGLPathCache *self,
GskPath *path,
GskFillRule fill_rule,
const GskStroke *stroke,
float scale_x,
float scale_y,
graphene_rect_t *out_bounds);
void gsk_gl_path_cache_commit (GskGLPathCache *self,
GskPath *path,
GskFillRule fill_rule,
const GskStroke *stroke,
float scale_x,
float scale_y,
int texture_id,
const graphene_rect_t *bounds);
#endif